Skip to content

Commit

Permalink
Update KEventInfo
Browse files Browse the repository at this point in the history
  • Loading branch information
JoramBerger committed Nov 30, 2014
1 parent 06f30d4 commit 2738bb3
Showing 1 changed file with 18 additions and 11 deletions.
29 changes: 18 additions & 11 deletions DataFormats/interface/KInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@ struct KProvenance
std::vector<std::string> branches;
};

/// RUN + LUMI METADATA
// RUN + LUMI METADATA
// List of user flags for luminosity sections (KLumiFlag...)
const unsigned int KLFPrescaleError = 1 << 0;

struct KLumiInfo
{
unsigned int nLumi;
Expand Down Expand Up @@ -54,7 +57,14 @@ struct KDataLumiInfo : public KLumiInfo
}
};

/* EVENT METADATA */
/// EVENT METADATA
// List of user flags for events (KEventFlag...)
const unsigned int KEFPhysicsDeclared = 1 << 0;
const unsigned int KEFHCALLooseNoise = 1 << 1;
const unsigned int KEFHCALTightNoise = 1 << 2;
const unsigned int KEFRecoErrors = 1 << 3;
const unsigned int KEFRecoWarnings = 1 << 4;

struct KEventInfo
{
unsigned long long bitsL1;
Expand All @@ -73,10 +83,16 @@ struct KEventInfo
return (bitsHLT & (1ull << i)) != 0;
return false; // Named HLT does not exist
}

inline bool hltFired (const size_t pos) const
{
return (bitsHLT & (1ull << pos)) != 0;
}

inline bool userFlag(const unsigned int mask) const
{
return (bitsUserFlags & mask) != 0;
}
};

// Nice names for types
Expand All @@ -86,15 +102,6 @@ typedef unsigned int run_id;
typedef unsigned short fill_id;
typedef int bx_id;

// List of user flags for events (KEventFlag...)
const unsigned int KEFPhysicsDeclared = 1 << 0;
const unsigned int KEFHCALLooseNoise = 1 << 1;
const unsigned int KEFHCALTightNoise = 1 << 2;
const unsigned int KEFRecoErrors = 1 << 3;
const unsigned int KEFRecoWarnings = 1 << 4;

// List of user flags for luminosity sections (KLumiFlag...)
const unsigned int KLFPrescaleError = 1 << 0;

struct KGenEventInfo : public KEventInfo
{
Expand Down

0 comments on commit 2738bb3

Please sign in to comment.