Skip to content

Commit 2738bb3

Browse files
committed
Update KEventInfo
1 parent 06f30d4 commit 2738bb3

File tree

1 file changed

+18
-11
lines changed

1 file changed

+18
-11
lines changed

DataFormats/interface/KInfo.h

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,10 @@ struct KProvenance
1818
std::vector<std::string> branches;
1919
};
2020

21-
/// RUN + LUMI METADATA
21+
// RUN + LUMI METADATA
22+
// List of user flags for luminosity sections (KLumiFlag...)
23+
const unsigned int KLFPrescaleError = 1 << 0;
24+
2225
struct KLumiInfo
2326
{
2427
unsigned int nLumi;
@@ -54,7 +57,14 @@ struct KDataLumiInfo : public KLumiInfo
5457
}
5558
};
5659

57-
/* EVENT METADATA */
60+
/// EVENT METADATA
61+
// List of user flags for events (KEventFlag...)
62+
const unsigned int KEFPhysicsDeclared = 1 << 0;
63+
const unsigned int KEFHCALLooseNoise = 1 << 1;
64+
const unsigned int KEFHCALTightNoise = 1 << 2;
65+
const unsigned int KEFRecoErrors = 1 << 3;
66+
const unsigned int KEFRecoWarnings = 1 << 4;
67+
5868
struct KEventInfo
5969
{
6070
unsigned long long bitsL1;
@@ -73,10 +83,16 @@ struct KEventInfo
7383
return (bitsHLT & (1ull << i)) != 0;
7484
return false; // Named HLT does not exist
7585
}
86+
7687
inline bool hltFired (const size_t pos) const
7788
{
7889
return (bitsHLT & (1ull << pos)) != 0;
7990
}
91+
92+
inline bool userFlag(const unsigned int mask) const
93+
{
94+
return (bitsUserFlags & mask) != 0;
95+
}
8096
};
8197

8298
// Nice names for types
@@ -86,15 +102,6 @@ typedef unsigned int run_id;
86102
typedef unsigned short fill_id;
87103
typedef int bx_id;
88104

89-
// List of user flags for events (KEventFlag...)
90-
const unsigned int KEFPhysicsDeclared = 1 << 0;
91-
const unsigned int KEFHCALLooseNoise = 1 << 1;
92-
const unsigned int KEFHCALTightNoise = 1 << 2;
93-
const unsigned int KEFRecoErrors = 1 << 3;
94-
const unsigned int KEFRecoWarnings = 1 << 4;
95-
96-
// List of user flags for luminosity sections (KLumiFlag...)
97-
const unsigned int KLFPrescaleError = 1 << 0;
98105

99106
struct KGenEventInfo : public KEventInfo
100107
{

0 commit comments

Comments
 (0)