ATLAS Offline Software
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
CutFlowSvc Class Reference

This implements the methods for ICutFlowSvc. More...

#include <CutFlowSvc.h>

Inheritance diagram for CutFlowSvc:
Collaboration diagram for CutFlowSvc:

Public Member Functions

 CutFlowSvc (const std::string &name, ISvcLocator *pSvcLocator)
 Constructor. More...
 
virtual StatusCode initialize () override final
 Gaudi Service Implementation. More...
 
virtual StatusCode queryInterface (const InterfaceID &riid, void **ppvi) override final
 
virtual void handle (const Incident &incident) override final
 Incident service handle listening for BeginInputFile, EndInputFile and MetaDataStop. More...
 
virtual CutIdentifier registerFilter (const std::string &name, const std::string &description, bool nominalOnly) override final
 Register filter in the CutFlowSvc and returns the CutID of the corresponding CutBookkeeper. More...
 
virtual CutIdentifier registerTopFilter ATLAS_NOT_THREAD_SAFE (const std::string &name, const std::string &description, unsigned int logic, const std::string &outputStream, bool nominalOnly) override final
 Tells CutFlowSvc that a filter is used directly by an outputStream with a given logical context. More...
 
virtual CutIdentifier registerCut (const std::string &name, const std::string &description, CutIdentifier parentCutID, bool nominalOnly) override final
 Register cut as child of a filter in the CutFlowSvc and returns the CutID of the corresponding EventBookkeeper. More...
 
virtual void setFilterDescription (CutIdentifier cutID, const std::string &descr) override final
 Set the description of an existing CutBookkeeper. More...
 
virtual void addEvent (CutIdentifier cutID, const std::vector< float > &weights) override final
 Tells CutFlowSvc to update the weighted event counter of a CutIdentifier cutID, using CutIdentifier returned by selfRegisterFilter. More...
 
virtual void addEvent (CutIdentifier cutID, double weight) override final
 Tells CutFlowSvc to update the weighted event counter of a CutIdentifier cutID, using CutIdentifier returned by selfRegisterFilter. More...
 
virtual uint64_t getNAcceptedEvents (const CutIdentifier cutID) const override final
 Get number of accepted events for a cut. More...
 
const CutBookkeepersLocalCachegetCutBookkeepers () const
 Get CutBookkeepers cache. More...
 
StatusCode setNumberOfWeightVariations (size_t count)
 Set number of weight variations. More...
 
MsgStream & msg () const
 
MsgStream & msg (const MSG::Level lvl) const
 
bool msgLvl (const MSG::Level lvl) const
 

Static Public Member Functions

static const InterfaceID & interfaceID ()
 Publish the interface for this service. More...
 

Private Member Functions

void addEvent (CutIdentifier cutID, size_t index, double weight)
 Tells CutFlowSvc to update the weighted event counter of a CutIdentifier cutID for a specific index in the cache. More...
 
StatusCode determineCycleNumberFromInput (const std::string &collName)
 Helper function to determine the processing cycle number from the input meta-data store. More...
 
StatusCode createContainers (size_t count)
 Helper function to create an empty containers (and its aux store) More...
 
xAOD::CutBookkeepergetCutBookkeeper (const CutIdentifier cutID, size_t index) const
 Get a CutBookkeeper given a CutID. More...
 

Private Attributes

Gaudi::Property< bool > m_configured {this, "Configured", true, "configuration check"}
 CutFlow service should be explicitly configured. More...
 
ServiceHandle< StoreGateSvcm_inMetaDataStore {this, "InputMetaDataStore", "StoreGateSvc/InputMetaDataStore", ""}
 The input meta-data store. More...
 
Gaudi::Property< std::string > m_completeCollName {this, "OutputCollName", "CutBookkeepers", ""}
 The name of the completed, i.e., fully processed, CutBookkeeperContainer. More...
 
CutBookkeepersLocalCache m_containers
 Local CutBookkeeperContainers. More...
 
Gaudi::Property< int > m_skimmingCycle {this, "SkimmingCycle", 0, "Skimming cycle of current job"}
 The current skimming cycle, i.e., how many processing stages we already had. More...
 
Gaudi::Property< std::string > m_inputStream {this, "InputStream", "N/A", "The name of the input file stream"}
 The name of the currently used input file stream. More...
 
std::recursive_mutex m_addEventMutex
 Mutex to protect adding an event. More...
 
std::unordered_set< CutIdentifierm_nominalOnlyCuts
 List of nominal-only filters. More...
 

Detailed Description

This implements the methods for ICutFlowSvc.

Definition at line 43 of file CutFlowSvc.h.

Constructor & Destructor Documentation

◆ CutFlowSvc()

CutFlowSvc::CutFlowSvc ( const std::string &  name,
ISvcLocator *  pSvcLocator 
)

Constructor.

Definition at line 23 of file CutFlowSvc.cxx.

24  :
25  AthService(name, pSvcLocator)
26 {
27  assert( pSvcLocator );
28 }

Member Function Documentation

◆ addEvent() [1/3]

void CutFlowSvc::addEvent ( CutIdentifier  cutID,
const std::vector< float > &  weights 
)
finaloverridevirtual

Tells CutFlowSvc to update the weighted event counter of a CutIdentifier cutID, using CutIdentifier returned by selfRegisterFilter.

Implements ICutFlowSvc.

Definition at line 178 of file CutFlowSvc.cxx.

180 {
181  if (weights.size() != m_containers.size()) {
182  ATH_MSG_ERROR("Inconsistent weights and variation sizes " << weights.size() << " and " << m_containers.size());
183  throw std::runtime_error("Inconsistent weights and variation sizes");
184  }
185 
186  for (size_t i = 0; i < m_containers.size(); ++i) {
187  addEvent(cutID, i, weights[i]);
188  }
189 }

◆ addEvent() [2/3]

void CutFlowSvc::addEvent ( CutIdentifier  cutID,
double  weight 
)
finaloverridevirtual

Tells CutFlowSvc to update the weighted event counter of a CutIdentifier cutID, using CutIdentifier returned by selfRegisterFilter.

Implements ICutFlowSvc.

Definition at line 193 of file CutFlowSvc.cxx.

195 {
196  if (m_nominalOnlyCuts.count(cutID) == 1) {
197  addEvent(cutID, 0, weight);
198  return;
199  }
200 
201  for (size_t i = 0; i < m_containers.size(); ++i) {
202  addEvent(cutID, i, weight);
203  }
204 }

◆ addEvent() [3/3]

void CutFlowSvc::addEvent ( CutIdentifier  cutID,
size_t  index,
double  weight 
)
private

Tells CutFlowSvc to update the weighted event counter of a CutIdentifier cutID for a specific index in the cache.

Definition at line 209 of file CutFlowSvc.cxx.

212 {
213  std::lock_guard<std::recursive_mutex> lock(m_addEventMutex);
214 
215  ATH_MSG_VERBOSE("Adding event with weight " << weight << " to cut " << cutID << " for variation " << index);
216 
218  if (cbk == nullptr) {
219  ATH_MSG_ERROR("Could not find CutBookkeeper for CutID " << cutID << " and variation " << index);
220  throw std::runtime_error("Could not find CutBookkeeper");
221  }
222 
223  cbk->addNAcceptedEvents(1);
226 }

◆ ATLAS_NOT_THREAD_SAFE()

virtual CutIdentifier registerTopFilter CutFlowSvc::ATLAS_NOT_THREAD_SAFE ( const std::string &  name,
const std::string &  description,
unsigned int  logic,
const std::string &  outputStream,
bool  nominalOnly 
)
finaloverridevirtual

Tells CutFlowSvc that a filter is used directly by an outputStream with a given logical context.

The only foreseen client should the DecisionSvc, with its Accept/Require/Veto.

Implements ICutFlowSvc.

◆ createContainers()

StatusCode CutFlowSvc::createContainers ( size_t  count)
private

Helper function to create an empty containers (and its aux store)

Definition at line 336 of file CutFlowSvc.cxx.

337 {
338  // Expect that this should only be called once for now
339  if (!m_containers.empty() && m_containers.size() == count) {
340  return StatusCode::SUCCESS;
341  }
342 
343  if (m_containers.size() > count) {
344  ATH_MSG_ERROR("Inconsistent variation count");
345  return StatusCode::FAILURE;
346  }
347 
348  ATH_MSG_VERBOSE("Create containers with count " << count);
349 
350  ATH_MSG_VERBOSE("Existing size " << m_containers.size());
351 
352  // Create the containers
354  if (count == 1) {
355  return StatusCode::SUCCESS;
356  }
357 
358  // Copy existing CutBookkeepers for consistency
360  if (first->empty()) {
361  return StatusCode::SUCCESS;
362  }
363  for (size_t i = 1; i < count; ++i) {
365  for (const xAOD::CutBookkeeper *cbk : *first) {
367  cont->push_back(newCbk);
368  *newCbk = *cbk;
369  }
370  }
371 
372  return StatusCode::SUCCESS;
373 }

◆ determineCycleNumberFromInput()

StatusCode CutFlowSvc::determineCycleNumberFromInput ( const std::string &  collName)
private

Helper function to determine the processing cycle number from the input meta-data store.

Definition at line 309 of file CutFlowSvc.cxx.

310 {
311  ATH_MSG_DEBUG("calling determineCycleNumberFromInput('" << collName
312  << "')... have currently cycle number = " << m_skimmingCycle );
313 
314  // Try to get CutBookkeepers from the input file
315  if ( m_inMetaDataStore->contains<xAOD::CutBookkeeperContainer>(collName) ) {
316  ATH_MSG_VERBOSE("Found xAOD::CutBookkeeperContainer in input MetaStore with name: " << collName);
317 
318  const xAOD::CutBookkeeperContainer* inputContainer{};
319  ATH_CHECK( m_inMetaDataStore->retrieve( inputContainer, collName ) );
320  // Now, iterate over all CutBookkeepers and search for the highest cycle number
321  int maxCycle{};
322  for (const xAOD::CutBookkeeper* cbk : *inputContainer) {
323  int inCycle = cbk->cycle();
324  if (inCycle > maxCycle) maxCycle = inCycle;
325  }
326  m_skimmingCycle = std::max(m_skimmingCycle.value(), maxCycle + 1);
327  }
328 
329  ATH_MSG_DEBUG("done calling determineCycleNumberFromInput('" << collName
330  << "')... have now cycle number = " << m_skimmingCycle );
331  return StatusCode::SUCCESS;
332 }

◆ getCutBookkeeper()

xAOD::CutBookkeeper * CutFlowSvc::getCutBookkeeper ( const CutIdentifier  cutID,
size_t  index 
) const
private

Get a CutBookkeeper given a CutID.

Definition at line 392 of file CutFlowSvc.cxx.

394 {
395  if (index >= m_containers.size()) {
396  return nullptr;
397  }
398 
399  for (xAOD::CutBookkeeper* cbk : *m_containers.at(index)) {
400  if (cbk->uniqueIdentifier() == cutID) {
401  return cbk;
402  }
403  }
404  return nullptr;
405 }

◆ getCutBookkeepers()

const CutBookkeepersLocalCache & CutFlowSvc::getCutBookkeepers ( ) const

Get CutBookkeepers cache.

Definition at line 385 of file CutFlowSvc.cxx.

386 {
387  return m_containers;
388 }

◆ getNAcceptedEvents()

uint64_t CutFlowSvc::getNAcceptedEvents ( const CutIdentifier  cutID) const
finaloverridevirtual

Get number of accepted events for a cut.

Implements ICutFlowSvc.

Definition at line 409 of file CutFlowSvc.cxx.

410 {
411  const xAOD::CutBookkeeper* cbk = getCutBookkeeper(cutID, 0);
412  if (cbk == nullptr) {
414  }
415  return cbk->nAcceptedEvents();
416 }

◆ handle()

void CutFlowSvc::handle ( const Incident &  incident)
finaloverridevirtual

Incident service handle listening for BeginInputFile, EndInputFile and MetaDataStop.

Definition at line 231 of file CutFlowSvc.cxx.

232 {
233  ATH_MSG_VERBOSE( "Start incident " << inc.type() );
234 
235  if (inc.type() == IncidentType::BeginInputFile) {
236  // Look up input stream name from FileMetaData
237  std::string inputstream = "";
238  if (m_inMetaDataStore->contains<xAOD::FileMetaData>("FileMetaData")) {
239  const xAOD::FileMetaData* fmd = nullptr;
240  if (m_inMetaDataStore->retrieve(fmd).isFailure()) {
241  ATH_MSG_ERROR("Failed to retrieve input FileMetaData");
242  } else if (fmd &&
243  !fmd->value(xAOD::FileMetaData::dataType, inputstream)) {
244  ATH_MSG_WARNING("Failed to get input stream name from FileMetaData");
245  }
246  } else {
247  ATH_MSG_DEBUG("No FileMetaData in input, trying EventStreamInfo");
248  // determine key for EventStreamInfo
249  std::vector<std::string> vKeys;
251  // eliminate duplicate keys
252  std::set<std::string> keys(vKeys.begin(), vKeys.end());
253  if (keys.size() == 1) {
254  std::string key = *keys.begin(); // get the one key
255  auto esi = m_inMetaDataStore->tryConstRetrieve<EventStreamInfo>(key);
256  if (esi && !esi->getProcessingTags().empty()) {
257  // use the first tag
258  inputstream = *esi->getProcessingTags().begin();
259  }
260  }
261  }
262 
263  if (inputstream.empty()) {
264  if (m_inputStream.empty()) {
265  ATH_MSG_FATAL("Cannot determine input stream name");
266  return;
267  }
269  "Failed to parse stream name from metadata, using "
270  "property \"InputStream\"");
271  inputstream = m_inputStream;
272  }
273 
274  // Check that input stream is consistent with previous file
275  ATH_MSG_DEBUG("Input stream name: \"" << inputstream << '"');
276  if (m_inputStream.empty()) {
277  m_inputStream = inputstream;
278  } else if (m_inputStream != inputstream) {
279  const FileIncident* finc = dynamic_cast<const FileIncident*>(&inc);
280  if (m_inputStream != "N/A" && m_inputStream != "unknownStream") {
281  ATH_MSG_FATAL("File " << finc->fileName() << " stream " << inputstream
282  << " does not match previous file "
283  << m_inputStream);
284  return;
285  }
286  }
287  }
288 
289  // Clear the local bookkeepers
290  if (inc.type() == "MetaDataStop") {
291  if (!m_containers.empty()) {
292  // Reset existing container
293  for (size_t i = 0; i < m_containers.size(); ++i) {
294  for (xAOD::CutBookkeeper* cbk : *m_containers.at(i)) {
295  cbk->setNAcceptedEvents(0);
296  cbk->setSumOfEventWeights(0);
297  cbk->setSumOfEventWeightsSquared(0);
298  }
299  }
300  }
301  }
302 
303  ATH_MSG_VERBOSE( "End incident " << inc.type() );
304  return;
305 }

◆ initialize()

StatusCode CutFlowSvc::initialize ( )
finaloverridevirtual

Gaudi Service Implementation.

Definition at line 32 of file CutFlowSvc.cxx.

33 {
34  ATH_MSG_DEBUG( "Initializing " << name() );
35 
36  // Only run if explicitly configured
37  if (m_configured.value() == false) {
38  ATH_MSG_ERROR("CutFlowSvc should be explicitly configured!");
39  return StatusCode::FAILURE;
40  }
41 
42  //Get input MetaData StoreGate
43  ATH_CHECK( m_inMetaDataStore.retrieve() );
44 
45  //Get IncidentSvc
46  ServiceHandle<IIncidentSvc> incSvc("IncidentSvc", this->name());
47  ATH_CHECK( incSvc.retrieve() );
48  incSvc->addListener(this, IncidentType::BeginInputFile, 60); // pri has to be < 100 to be after MetaDataSvc.
49  incSvc->addListener(this, "MetaDataStop", 30);
50 
51  // Create initial bookkeeper container for bookkeepers in _this_ processing
53 
54  // Determine the skimming cycle number that we should use now from the input file
55  ATH_MSG_VERBOSE("Have currently the cycle number = " << m_skimmingCycle );
57  ATH_MSG_VERBOSE("Will use cycle number = " << m_skimmingCycle );
58 
59  return StatusCode::SUCCESS;
60 }

◆ interfaceID()

const InterfaceID & CutFlowSvc::interfaceID ( )
inlinestatic

Publish the interface for this service.

Definition at line 166 of file CutFlowSvc.h.

166  {
167  return ICutFlowSvc::interfaceID();
168 }

◆ msg() [1/2]

MsgStream& AthCommonMsg< Service >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24  {
25  return this->msgStream();
26  }

◆ msg() [2/2]

MsgStream& AthCommonMsg< Service >::msg ( const MSG::Level  lvl) const
inlineinherited

Definition at line 27 of file AthCommonMsg.h.

27  {
28  return this->msgStream(lvl);
29  }

◆ msgLvl()

bool AthCommonMsg< Service >::msgLvl ( const MSG::Level  lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30  {
31  return this->msgLevel(lvl);
32  }

◆ queryInterface()

StatusCode CutFlowSvc::queryInterface ( const InterfaceID &  riid,
void **  ppvi 
)
finaloverridevirtual

Definition at line 420 of file CutFlowSvc.cxx.

421 {
422  // valid placeholder?
423  if ( 0 == ppvi ) { return StatusCode::FAILURE ; } // RETURN
424  if ( ICutFlowSvc::interfaceID() == riid ) {
425  *ppvi = static_cast<ICutFlowSvc*>(this);
426  addRef(); // NB! : increment the reference count!
427  return StatusCode::SUCCESS; // RETURN
428  } else if ( IIncidentListener::interfaceID() == riid ) {
429  *ppvi = static_cast<IIncidentListener*>(this);
430  addRef(); // NB! : increment the reference count!
431  return StatusCode::SUCCESS; // RETURN
432  }
433  // Interface is not directly available: try out a base class
434  return AthService::queryInterface( riid, ppvi );
435 }

◆ registerCut()

CutIdentifier CutFlowSvc::registerCut ( const std::string &  name,
const std::string &  description,
CutIdentifier  parentCutID,
bool  nominalOnly 
)
finaloverridevirtual

Register cut as child of a filter in the CutFlowSvc and returns the CutID of the corresponding EventBookkeeper.

This method should be used by filters to register their internal cuts that are not the Algs themselves.

Implements ICutFlowSvc.

Definition at line 130 of file CutFlowSvc.cxx.

134 {
135  ATH_MSG_DEBUG("Registering cut with name '" << name << "', description '" << description
136  << "' and original CutID " << parentCutID);
137 
138  // Get the CutBookkeeper of the origin Filter Algorithm/Tool
139  xAOD::CutBookkeeper* parentCbk = getCutBookkeeper(parentCutID, 0);
140  if (parentCbk == nullptr) {
141  ATH_MSG_ERROR("Could not find parent CutBookkeeper with CutID " << parentCutID);
142  throw std::runtime_error("Could not find CutBookkeeper");
143  }
144 
145  // Call the registerFilter method and get the correct CutBookkeeper
146  // from the returned cutID
147  CutIdentifier cutID = registerFilter(name, description, nominalOnly);
148  xAOD::CutBookkeeper* cbk = getCutBookkeeper(cutID, 0);
149  if (cbk == nullptr) {
150  ATH_MSG_ERROR("Could not find CutBookkeeper with CutID " << cutID);
151  throw std::runtime_error("Could not find CutBookkeeper");
152  }
153 
154  // Add child to parent
155  parentCbk->addChild(cbk);
156 
157  return cutID;
158 }

◆ registerFilter()

CutIdentifier CutFlowSvc::registerFilter ( const std::string &  name,
const std::string &  description,
bool  nominalOnly 
)
finaloverridevirtual

Register filter in the CutFlowSvc and returns the CutID of the corresponding CutBookkeeper.

This method should be used by filters that register themselves.

Implements ICutFlowSvc.

Definition at line 64 of file CutFlowSvc.cxx.

67 {
68  ATH_MSG_DEBUG("Registering filter with name '" << name << "' and description '" << description << "'");
69 
70  auto newCbk = std::make_unique<xAOD::CutBookkeeper>();
71  newCbk->setName(name);
72  newCbk->setDescription(description);
73  newCbk->setInputStream(m_inputStream);
74  newCbk->setCycle(m_skimmingCycle);
75  CutIdentifier cutID = newCbk->uniqueIdentifier();
76 
77  // Let's see if an CutBookkeeper of this name already exists
79  ATH_MSG_VERBOSE("Searching if this CutBookkeeper already exists");
80  for (xAOD::CutBookkeeper* cbk : *container) {
81  if (newCbk->isEqualTo(cbk)) {
82  ATH_MSG_DEBUG("The CutBookkeeper with name '" << name << "' already exists"
83  << " and has CutID " << cbk->uniqueIdentifier() << "... Not adding!" );
84  // Return the existing cut ID
85  return cbk->uniqueIdentifier();
86  }
87  }
88 
89  // If it is a new CutBookkeeper, add it to the container
90  ATH_MSG_DEBUG("Declaring a new filter with name '" << name << "' and CutID " << cutID );
91  container->push_back(std::move(newCbk));
92 
93  if (nominalOnly) {
94  m_nominalOnlyCuts.emplace(cutID);
95  }
96 
97  return cutID;
98 }

◆ setFilterDescription()

void CutFlowSvc::setFilterDescription ( CutIdentifier  cutID,
const std::string &  descr 
)
finaloverridevirtual

Set the description of an existing CutBookkeeper.

Implements ICutFlowSvc.

Definition at line 162 of file CutFlowSvc.cxx.

164 {
165  ATH_MSG_DEBUG("calling setFilterDescription(" << cutID << ", " << descr << ")" );
166 
167  for (size_t i = 0; i < m_containers.size(); ++i) {
168  xAOD::CutBookkeeper* cbk = getCutBookkeeper(cutID, i);
169  if (cbk != nullptr) {
170  cbk->setDescription(descr);
171  }
172  }
173  return;
174 }

◆ setNumberOfWeightVariations()

StatusCode CutFlowSvc::setNumberOfWeightVariations ( size_t  count)

Set number of weight variations.

Definition at line 377 of file CutFlowSvc.cxx.

378 {
380  return StatusCode::SUCCESS;
381 }

Member Data Documentation

◆ m_addEventMutex

std::recursive_mutex CutFlowSvc::m_addEventMutex
mutableprivate

Mutex to protect adding an event.

Definition at line 154 of file CutFlowSvc.h.

◆ m_completeCollName

Gaudi::Property<std::string> CutFlowSvc::m_completeCollName {this, "OutputCollName", "CutBookkeepers", ""}
private

The name of the completed, i.e., fully processed, CutBookkeeperContainer.

Definition at line 142 of file CutFlowSvc.h.

◆ m_configured

Gaudi::Property<bool> CutFlowSvc::m_configured {this, "Configured", true, "configuration check"}
private

CutFlow service should be explicitly configured.

Definition at line 136 of file CutFlowSvc.h.

◆ m_containers

CutBookkeepersLocalCache CutFlowSvc::m_containers
private

Local CutBookkeeperContainers.

Definition at line 145 of file CutFlowSvc.h.

◆ m_inMetaDataStore

ServiceHandle<StoreGateSvc> CutFlowSvc::m_inMetaDataStore {this, "InputMetaDataStore", "StoreGateSvc/InputMetaDataStore", ""}
private

The input meta-data store.

Definition at line 139 of file CutFlowSvc.h.

◆ m_inputStream

Gaudi::Property<std::string> CutFlowSvc::m_inputStream {this, "InputStream", "N/A", "The name of the input file stream"}
private

The name of the currently used input file stream.

Definition at line 151 of file CutFlowSvc.h.

◆ m_nominalOnlyCuts

std::unordered_set<CutIdentifier> CutFlowSvc::m_nominalOnlyCuts
private

List of nominal-only filters.

Definition at line 157 of file CutFlowSvc.h.

◆ m_skimmingCycle

Gaudi::Property<int> CutFlowSvc::m_skimmingCycle {this, "SkimmingCycle", 0, "Skimming cycle of current job"}
private

The current skimming cycle, i.e., how many processing stages we already had.

Definition at line 148 of file CutFlowSvc.h.


The documentation for this class was generated from the following files:
AthService::AthService
AthService()
CutFlowSvc::m_inMetaDataStore
ServiceHandle< StoreGateSvc > m_inMetaDataStore
The input meta-data store.
Definition: CutFlowSvc.h:139
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
CutFlowSvc::determineCycleNumberFromInput
StatusCode determineCycleNumberFromInput(const std::string &collName)
Helper function to determine the processing cycle number from the input meta-data store.
Definition: CutFlowSvc.cxx:309
CutFlowSvc::m_configured
Gaudi::Property< bool > m_configured
CutFlow service should be explicitly configured.
Definition: CutFlowSvc.h:136
max
#define max(a, b)
Definition: cfImp.cxx:41
ICutFlowSvc
This class provides an interface between event filtering algorithms and athena input/output streams,...
Definition: ICutFlowSvc.h:38
xAOD::CutBookkeeper_v1::setDescription
void setDescription(const std::string &description)
Set the description of this CutBookkeeper.
Definition: CutBookkeeper_v1.cxx:177
CutFlowSvc::getCutBookkeeper
xAOD::CutBookkeeper * getCutBookkeeper(const CutIdentifier cutID, size_t index) const
Get a CutBookkeeper given a CutID.
Definition: CutFlowSvc.cxx:392
index
Definition: index.py:1
EventStreamInfo::getProcessingTags
const std::set< std::string > & getProcessingTags() const
Definition: EventStreamInfo.cxx:35
xAOD::CutBookkeeper_v1
Description of the class that is used to keep track of event counts.
Definition: CutBookkeeper_v1.h:29
CutFlowSvc::createContainers
StatusCode createContainers(size_t count)
Helper function to create an empty containers (and its aux store)
Definition: CutFlowSvc.cxx:336
CutBookkeepersLocalCache::size
std::size_t size() const
Definition: CutBookkeepersLocalCache.h:20
CutFlowSvc::m_addEventMutex
std::recursive_mutex m_addEventMutex
Mutex to protect adding an event.
Definition: CutFlowSvc.h:154
CutFlowSvc::m_containers
CutBookkeepersLocalCache m_containers
Local CutBookkeeperContainers.
Definition: CutFlowSvc.h:145
CutFlowSvc::m_inputStream
Gaudi::Property< std::string > m_inputStream
The name of the currently used input file stream.
Definition: CutFlowSvc.h:151
xAOD::CutBookkeeper_v1::addChild
void addChild(CutBookkeeper_v1 *childEB)
Add one child to this CutBookkeeper.
Definition: CutBookkeeper_v1.cxx:442
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
XMLtoHeader.count
count
Definition: XMLtoHeader.py:85
xAOD::FileMetaData_v1::value
bool value(MetaDataType type, std::string &val) const
Get a pre-defined string value out of the object.
Definition: FileMetaData_v1.cxx:195
dqt_zlumi_pandas.weight
int weight
Definition: dqt_zlumi_pandas.py:200
CutBookkeepersLocalCache::prepareContainers
static void prepareContainers(CutBookkeepersLocalCache &target, size_t size, bool extend=false)
Definition: CutBookkeepersLocalCache.h:25
xAOD::CutBookkeeper_v1::addNAcceptedEvents
void addNAcceptedEvents(uint64_t nEvents)
Add seen events to the number of accepted events that this CutBookkeeper has seen.
Definition: CutBookkeeper_v1.cxx:302
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
lumiFormat.i
int i
Definition: lumiFormat.py:92
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
CutFlowSvc::registerFilter
virtual CutIdentifier registerFilter(const std::string &name, const std::string &description, bool nominalOnly) override final
Register filter in the CutFlowSvc and returns the CutID of the corresponding CutBookkeeper.
Definition: CutFlowSvc.cxx:64
CutFlowSvc::m_completeCollName
Gaudi::Property< std::string > m_completeCollName
The name of the completed, i.e., fully processed, CutBookkeeperContainer.
Definition: CutFlowSvc.h:142
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
python.TransformConfig.descr
descr
print "%s.properties()" % self.__name__
Definition: TransformConfig.py:360
xAOD::CutBookkeeperContainer_v1
Container that holds the Container of all CutBookkeepers.
Definition: CutBookkeeperContainer_v1.h:27
CutIdentifier
uint32_t CutIdentifier
InstanceIdentifier is a unique identifer used for every AthFilterAlgorithm instance.
Definition: ICutFlowSvc.h:22
xAOD::FileMetaData_v1
Class holding file-level metadata about an xAOD file.
Definition: FileMetaData_v1.h:34
CutBookkeepersLocalCache::at
xAOD::CutBookkeeperContainer * at(std::size_t n) const
Definition: CutBookkeepersLocalCache.h:21
python.compareNtuple.vKeys
vKeys
Definition: compareNtuple.py:44
xAOD::CutBookkeeper_v1::nAcceptedEvents
uint64_t nAcceptedEvents() const
Get the number of accepted events that this CutBookkeeper has seen.
Definition: CutBookkeeper_v1.cxx:291
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
xAOD::CutBookkeeper_v1::addSumOfEventWeights
void addSumOfEventWeights(double nWeightedEvents)
Add more sum-of-event-weights that this CutBookkeeper has seen.
Definition: CutBookkeeper_v1.cxx:320
xAOD::CutBookkeeper
CutBookkeeper_v1 CutBookkeeper
Define the latest version of the CutBookkeeper class.
Definition: CutBookkeeper.h:17
DataVector::push_back
value_type push_back(value_type pElem)
Add an element to the end of the collection.
CutFlowSvc::m_skimmingCycle
Gaudi::Property< int > m_skimmingCycle
The current skimming cycle, i.e., how many processing stages we already had.
Definition: CutFlowSvc.h:148
CutBookkeepersLocalCache::empty
bool empty() const
Definition: CutBookkeepersLocalCache.h:19
ICutFlowSvc::interfaceID
static const InterfaceID & interfaceID()
Gaudi boilerplate.
Definition: ICutFlowSvc.h:98
EventStreamInfo
This class provides the summary information stored for data written as a Event Stream.
Definition: EventStreamInfo.h:28
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
DeMoScan.first
bool first
Definition: DeMoScan.py:534
xAOD::CutBookkeeper_v1::addSumOfEventWeightsSquared
void addSumOfEventWeightsSquared(double nWeightedEventsSquared)
Add more sum-of-(event-weights-squared) that this CutBookkeeper has seen.
Definition: CutBookkeeper_v1.cxx:338
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:790
xAOD::FileMetaData_v1::dataType
@ dataType
Data type that's in the file [string].
Definition: FileMetaData_v1.h:64
CutFlowSvc::addEvent
virtual void addEvent(CutIdentifier cutID, const std::vector< float > &weights) override final
Tells CutFlowSvc to update the weighted event counter of a CutIdentifier cutID, using CutIdentifier r...
Definition: CutFlowSvc.cxx:178
CutFlowSvc::m_nominalOnlyCuts
std::unordered_set< CutIdentifier > m_nominalOnlyCuts
List of nominal-only filters.
Definition: CutFlowSvc.h:157
description
std::string description
glabal timer - how long have I taken so far?
Definition: hcg.cxx:88
ServiceHandle< IIncidentSvc >
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37