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

#include <AANTupleStream.h>

Inheritance diagram for AANTupleStream:
Collaboration diagram for AANTupleStream:

Public Member Functions

 AANTupleStream (const std::string &name, ISvcLocator *pSvcLocator)
 Standard AANTupleStream Constructor. More...
 
virtual ~AANTupleStream ()
 Standard Destructor. More...
 
virtual StatusCode initialize ()
 Initialize AANTupleStream. More...
 
virtual StatusCode finalize ()
 Terminate AANTupleStream. More...
 
virtual StatusCode execute ()
 Working entry point. More...
 
const EventContext & getContext () const
 
virtual const DataObjIDColl & extraOutputDeps () const override
 
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & evtStore () const
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc. More...
 
virtual StatusCode sysInitialize () override
 Perform system initialization for an algorithm. More...
 
virtual StatusCode sysStart () override
 Handle START transition. More...
 
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles. More...
 
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles. More...
 
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T > &t)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc="none")
 Declare a new Gaudi property. More...
 
void updateVHKA (Gaudi::Details::PropertyBase &)
 
MsgStream & msg () const
 
MsgStream & msg (const MSG::Level lvl) const
 
bool msgLvl (const MSG::Level lvl) const
 

Protected Member Functions

bool isReEntrant () const override final
 
void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution More...
 
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
 
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed. More...
 

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

StatusCode initCollection ()
 Initialize the output collection. More...
 
StatusCode getRef (CLID id, const std::string &key, std::string &ref)
 Get ref from a proxy. More...
 
StatusCode splitAddress (const std::string &address, const std::string &match, std::string &address_header, std::string &address_data) const
 Split the address to get pool token. More...
 
StatusCode initialize_subAlgos ()
 initialize sub-algos More...
 
StatusCode execute_subAlgos ()
 execute sub-algos More...
 
void writeAttributeListSpecification ()
 write schema of AttributeList More...
 
void setupTree ()
 setup Tree More...
 
bool writeTokenAttrList (const std::string &token, const coral::AttributeList &attributeList)
 write Token and AttributeList More...
 
StatusCode getFilters ()
 get filter alogs More...
 
bool isEventAccepted () const
 check filters passed More...
 
StatusCode initSchema ()
 
StatusCode io_reinit ()
 callback method to reinitialize the internal state of the component for I/O purposes (e.g. More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyArrayType &)
 specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleType &)
 specialization for handling Gaudi::Property<SG::VarHandleBase> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &t, const SG::NotHandleType &)
 specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
 

Private Attributes

ServiceHandle< IAddressCreator > m_persSvc
 Persistency service. More...
 
coral::AttributeListSpecification * m_attribSpec
 Collection attribute specification. More...
 
std::string m_fileName
 Name of the output collection. More...
 
StringArrayProperty m_extraRefNames
 Vector of extra parent ref names to register in collection. More...
 
BooleanProperty m_writeInputDH
 Flag to signal whether or not to write input data header. More...
 
BooleanProperty m_existDH
 Flag to signal whether data header exists. More...
 
std::string m_streamName
 Name of Stream. More...
 
BooleanProperty m_lateSchema
 write schema in execute() More...
 
std::string m_macro
 macro More...
 
bool m_schemaDone
 first event More...
 
std::string m_treeName
 Name of the output tree. More...
 
std::vector< std::string > m_acceptNames
 Vector of names of Algorithms that this stream accepts. More...
 
std::vector< IAlgorithm * > m_acceptAlgs
 Vector of Algorithms that this stream accepts. More...
 
TTree * m_tree
 TTree. More...
 
TBranch * m_tokenBranch
 TBranch which contains Token info. More...
 
ServiceHandle< ITHistSvc > m_tHistSvc
 THistSvc. More...
 
std::vector< std::string > m_membersNames
 
char m_tokenCString [s_maxLengthOfStrings]
 
DataObjIDColl m_extendedExtraObjects
 
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default) More...
 
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default) More...
 
std::vector< SG::VarHandleKeyArray * > m_vhka
 
bool m_varHandleArraysDeclared
 

Static Private Attributes

static const unsigned int s_maxLengthOfStrings = 5000
 for string branches More...
 

Detailed Description

Definition at line 33 of file AANTupleStream.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< Gaudi::Sequence > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ AANTupleStream()

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

Standard AANTupleStream Constructor.

Definition at line 48 of file AANTupleStream.cxx.

49  : AthLegacySequence(name, pSvcLocator),
50  m_persSvc ("EventPersistencySvc", name),
51  m_attribSpec(0),
52  m_schemaDone(false),
53  m_tree(0),
54  m_tokenBranch(0),
55  m_tHistSvc ("THistSvc", name)
56 {
57  declareProperty("OutputName", m_fileName="AANTuple.root");
58  declareProperty("ExtraRefNames", m_extraRefNames);
59  declareProperty("WriteInputDataHeader", m_writeInputDH=false);
60  declareProperty("ExistDataHeader", m_existDH=true);
61  declareProperty("StreamName", m_streamName=c_streamName);
62  declareProperty("LateSchemaWriting", m_lateSchema=false);
63  declareProperty("TreeName", m_treeName=c_treeName);
64  declareProperty("Macro", m_macro="");
65  declareProperty("Members", m_membersNames);
66  declareProperty("FilterAlgs", m_acceptNames);
67 
68  m_tokenCString[0] = '\0';
69 }

◆ ~AANTupleStream()

AANTupleStream::~AANTupleStream ( )
virtual

Standard Destructor.

Definition at line 73 of file AANTupleStream.cxx.

74 {
75 }

Member Function Documentation

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Gaudi::Sequence > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyArrayType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKeyArray>

Definition at line 170 of file AthCommonDataStore.h.

172  {
173  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
174  hndl.value(),
175  hndl.documentation());
176 
177  }

◆ declareGaudiProperty() [2/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Gaudi::Sequence > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158  {
159  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
160  hndl.value(),
161  hndl.documentation());
162 
163  }

◆ declareGaudiProperty() [3/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Gaudi::Sequence > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleBase>

Definition at line 184 of file AthCommonDataStore.h.

186  {
187  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
188  hndl.value(),
189  hndl.documentation());
190  }

◆ declareGaudiProperty() [4/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Gaudi::Sequence > >::declareGaudiProperty ( Gaudi::Property< T > &  t,
const SG::NotHandleType  
)
inlineprivateinherited

specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray>

Definition at line 199 of file AthCommonDataStore.h.

200  {
201  return PBASE::declareProperty(t);
202  }

◆ declareProperty() [1/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Gaudi::Sequence > >::declareProperty ( const std::string &  name,
SG::VarHandleBase hndl,
const std::string &  doc,
const SG::VarHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleBase. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 245 of file AthCommonDataStore.h.

249  {
250  this->declare(hndl.vhKey());
251  hndl.vhKey().setOwner(this);
252 
253  return PBASE::declareProperty(name,hndl,doc);
254  }

◆ declareProperty() [2/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Gaudi::Sequence > >::declareProperty ( const std::string &  name,
SG::VarHandleKey hndl,
const std::string &  doc,
const SG::VarHandleKeyType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleKey. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 221 of file AthCommonDataStore.h.

225  {
226  this->declare(hndl);
227  hndl.setOwner(this);
228 
229  return PBASE::declareProperty(name,hndl,doc);
230  }

◆ declareProperty() [3/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Gaudi::Sequence > >::declareProperty ( const std::string &  name,
SG::VarHandleKeyArray hndArr,
const std::string &  doc,
const SG::VarHandleKeyArrayType  
)
inlineinherited

Definition at line 259 of file AthCommonDataStore.h.

263  {
264 
265  // std::ostringstream ost;
266  // ost << Algorithm::name() << " VHKA declareProp: " << name
267  // << " size: " << hndArr.keys().size()
268  // << " mode: " << hndArr.mode()
269  // << " vhka size: " << m_vhka.size()
270  // << "\n";
271  // debug() << ost.str() << endmsg;
272 
273  hndArr.setOwner(this);
274  m_vhka.push_back(&hndArr);
275 
276  Gaudi::Details::PropertyBase* p = PBASE::declareProperty(name, hndArr, doc);
277  if (p != 0) {
278  p->declareUpdateHandler(&AthCommonDataStore<PBASE>::updateVHKA, this);
279  } else {
280  ATH_MSG_ERROR("unable to call declareProperty on VarHandleKeyArray "
281  << name);
282  }
283 
284  return p;
285 
286  }

◆ declareProperty() [4/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Gaudi::Sequence > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc,
const SG::NotHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This is the generic version, for types that do not derive from SG::VarHandleKey. It just forwards to the base class version of declareProperty.

Definition at line 333 of file AthCommonDataStore.h.

337  {
338  return PBASE::declareProperty(name, property, doc);
339  }

◆ declareProperty() [5/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Gaudi::Sequence > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc = "none" 
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This dispatches to either the generic declareProperty or the one for VarHandle/Key/KeyArray.

Definition at line 352 of file AthCommonDataStore.h.

355  {
356  typedef typename SG::HandleClassifier<T>::type htype;
357  return declareProperty (name, property, doc, htype());
358  }

◆ declareProperty() [6/6]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Gaudi::Sequence > >::declareProperty ( Gaudi::Property< T > &  t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145  {
146  typedef typename SG::HandleClassifier<T>::type htype;
148  }

◆ detStore()

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< Gaudi::Sequence > >::detStore
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

95 { return m_detStore; }

◆ evtStore() [1/2]

ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< Gaudi::Sequence > >::evtStore
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

85 { return m_evtStore; }

◆ evtStore() [2/2]

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< Gaudi::Sequence > >::evtStore
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 90 of file AthCommonDataStore.h.

90 { return m_evtStore; }

◆ execute()

StatusCode AANTupleStream::execute ( )
virtual

Working entry point.

Implements AthLegacySequence.

Definition at line 173 of file AANTupleStream.cxx.

174 {
175  StatusCode sc;
176 
177  if (!m_schemaDone) {
178  sc = initSchema();
179  if (sc.isFailure())
180  return sc;
181  }
182 
183  // execute sub-algos
184  sc = execute_subAlgos();
185  if ( sc.isFailure() )
186  {
187  ATH_MSG_ERROR ("Could not execute sub-algos");
188  return sc;
189  }
190 
191  std::map<std::string,std::string> inputRefs;
192  std::string ref;
193 
194  // Get tokens specified by item list
195  if (m_existDH)
196  {
197  // get token
200  StatusCode status = evtStore()->retrieve(beg,ending);
201  if (status.isFailure() || beg==ending)
202  {
203  ATH_MSG_WARNING ("No DataHeaders present in StoreGate");
204  return StatusCode::FAILURE;
205  }
206 
207  // look for header
208  for (; beg != ending; ++beg)
209  if (m_writeInputDH == beg->isInput()) break;
210 
211  if (beg==ending)
212  {
213  ATH_MSG_WARNING ("No appropriate DataHeader present in StoreGate");
214  return StatusCode::FAILURE;
215  }
216 
217  // get the ref
218  while (getRef(ClassID_traits<DataHeader>::ID(), beg.key(), ref) == StatusCode::FAILURE)
219  {
220  ++beg;
221  if (beg==ending)
222  {
223  ATH_MSG_ERROR ("No refs found");
224  return StatusCode::FAILURE;
225  }
226  }
227 
228  ATH_MSG_DEBUG ("Found token: Key=" << beg.key() << ", Ref=" << ref);
229 
230  // Get a single input header ref if requested
231  const DataHeader* hdr = &(*beg);
232  if (hdr->sizeProvenance())
233  {
234  std::vector<DataHeaderElement>::const_iterator it =
235  (const_cast<DataHeader*>(hdr)->beginProvenance());
236  std::vector<DataHeaderElement>::const_iterator itE =
237  (const_cast<DataHeader*>(hdr)->endProvenance());
238  // grab refs for those
239  for (; it!=itE; ++it)
240  {
241  std::string tmpRef = (*it).getToken() != NULL
242  ? (*it).getToken()->toString()
243  : "";
244  inputRefs.insert(std::make_pair(it->getKey(),tmpRef));
245  ATH_MSG_DEBUG ("Found ref for input header: Key=" << it->getKey()
246  << ", Ref=" << tmpRef);
247  }
248  }
249  }
250 
251  // create Attrlist, add attributes and if extra ref is requested, append to the end
252 
253  ATH_MSG_DEBUG ("create AttributeList");
254  // AthenaAttributeList newAttr(*m_attribSpec);
256 
257  unsigned int runNumber = 0;
258  unsigned int eventNumber = 0;
259 
260  // retrieve event info
261  const EventInfo* eventInfo;
262  eventInfo = evtStore()->tryConstRetrieve<EventInfo>();
263  if ( !eventInfo )
264  {
265  // Try to get the xAOD::EventInfo
266  const xAOD::EventInfo* eventInfoX{nullptr};
267  ATH_CHECK( evtStore()->retrieve(eventInfoX) );
268  runNumber = eventInfoX->runNumber();
269  eventNumber = eventInfoX->eventNumber();
270  }
271  else
272  {
273  runNumber = eventInfo->event_ID()->run_number();
274  eventNumber = eventInfo->event_ID()->event_number();
275  }
276 
277  // add global event tag data
278  newAttr[ name_RunNumber ].setValue( runNumber );
279  newAttr[ name_EventNumber ].setValue( eventNumber );
280 
281  // add back nav ref's
282  ATH_MSG_DEBUG ("Append extra ref");
283  std::vector<std::string> extraRefs = m_extraRefNames.value();
284  std::map<std::string,std::string>::iterator itRef = inputRefs.begin();
285  std::map<std::string,std::string>::iterator itRefE = inputRefs.end();
286  for (; itRef != itRefE; ++itRef)
287  {
288  std::string name = itRef->first + "_ref";
289  if (extraRefs.end() != std::find(extraRefs.begin(),extraRefs.end(),itRef->first))
290  {
291  newAttr[name].setValue(std::string(itRef->second));
292  ATH_MSG_DEBUG (" Added extra ref to new attribute list - name: "
293  << name << " " << itRef->second);
294  }
295  }
296 
297  // write if filters passed
298  if (isEventAccepted())
299  {
300  ATH_MSG_DEBUG ("write attributes to collection");
301 
302  // write token plus attributes
303  try
304  {
305  writeTokenAttrList(ref, newAttr);
306  }
307  catch (std::exception &e)
308  {
310  ("Caught exception from collection add of Pool attributes. "
311  "Message: " << e.what());
312  return StatusCode::FAILURE;
313  }
314  }
315 
316  ATH_MSG_DEBUG ("done successfully");
317 
318  return StatusCode::SUCCESS;
319 }

◆ execute_subAlgos()

StatusCode AANTupleStream::execute_subAlgos ( )
private

execute sub-algos

Definition at line 559 of file AANTupleStream.cxx.

560 {
561  StatusCode sc = StatusCode::SUCCESS;
562 
563  ATH_MSG_DEBUG ("in execute_subAlgos() ...");
564 
565  const EventContext& ctx = Gaudi::Hive::currentContext();
566 
567  // -- run subalgorithms
568  for ( unsigned int i=0; i < m_membersNames.size(); ++i )
569  {
570  ATH_MSG_DEBUG (" -> calling sub-algorithm " << m_membersNames[i]);
571  // skip disabled algo
572  if (! (*(this->subAlgorithms()))[i]->isEnabled()) continue ;
573 
574  sc = (*(this->subAlgorithms()))[i]->execute(ctx);
575  if ( sc.isFailure())
576  {
578  (" ERROR executing sub-algorithm:" << m_membersNames[i]);
579  return StatusCode::FAILURE;
580  }
581  }
582  return sc;
583 }

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< Gaudi::Sequence > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase &  ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ extraOutputDeps()

const DataObjIDColl & Athena::details::AthLegacySequenceAdapter::extraOutputDeps ( ) const
overridevirtualinherited

Definition at line 30 of file AthLegacySequence.cxx.

30  {
31  if (!m_extendedExtraObjects.empty()) {
33  }
34  return Gaudi::Sequence::extraOutputDeps();
35  }

◆ finalize()

StatusCode AANTupleStream::finalize ( )
virtual

Terminate AANTupleStream.

Definition at line 149 of file AANTupleStream.cxx.

150 {
151  ATH_MSG_INFO ("finalize");
152 
153  // exec macro
154  if (m_macro != "")
155  {
156  // save current dir
157  std::string curDir = gDirectory->GetPath();
158  // go to the root dir of output file
159  gDirectory->cd((m_fileName+":/").c_str());
160  // exec
161  // G__exec_tempfile(m_macro.c_str());
162  // MN: that should be the equivalent new call:
163  gInterpreter->ExecuteMacro(m_macro.c_str());
164  // back to the current dir
165  gDirectory->cd(curDir.c_str());
166  }
167 
169 }

◆ getContext()

const EventContext& Athena::details::AthLegacySequenceAdapter::getContext ( ) const
inlineinherited

Definition at line 36 of file AthLegacySequence.h.

36 { return Gaudi::Hive::currentContext(); }

◆ getFilters()

StatusCode AANTupleStream::getFilters ( )
private

get filter alogs

Definition at line 587 of file AANTupleStream.cxx.

588 {
589  ATH_MSG_DEBUG ("in getFilters()");
590 
591  // no filter
592  if (m_acceptNames.empty())
593  return StatusCode::SUCCESS;
594 
595  ServiceHandle<IAlgManager> theAlgMgr("ApplicationMgr", this->name());
596  ATH_CHECK( theAlgMgr.retrieve() );
597 
598  // loop over all alg names
599  for (const std::string& name : m_acceptNames)
600  {
601  SmartIF<IAlgorithm> ialg{theAlgMgr->algorithm(name)};
602  if (!ialg )
603  {
604  ATH_MSG_ERROR ("Can't get Filter Alg : " << name);
605  return StatusCode::FAILURE;
606  }
607  ATH_MSG_DEBUG (" -> getting Filter Alg success " << name);
608  // push back
609  m_acceptAlgs.push_back(ialg);
610  }
611  return StatusCode::SUCCESS;
612 }

◆ getRef()

StatusCode AANTupleStream::getRef ( CLID  id,
const std::string &  key,
std::string &  ref 
)
private

Get ref from a proxy.

Definition at line 385 of file AANTupleStream.cxx.

386 {
387  // Must access the SG proxy to get the IOpaqueAddress
388  SG::DataProxy* itemProxy = 0;
389  ATH_MSG_DEBUG ("Retrieving proxy for " << id << " " << key);
390  itemProxy = evtStore()->proxy(id, key);
391  if (!itemProxy)
392  {
393  ATH_MSG_ERROR ("Could not get proxy ");
394  return(StatusCode::FAILURE);
395  }
396  else
397  {
398  ATH_MSG_DEBUG (" found proxy for ("<< id << ",\"" << key << "\") ");
399  }
400 
401  if (!itemProxy)
402  {
403  ATH_MSG_ERROR ("Empty proxy ");
404  return(StatusCode::FAILURE);
405  }
406 
407  // Get IOpaqueAddress from the proxy
408  IOpaqueAddress* addr = itemProxy->address();
409  if (!addr)
410  {
411  ATH_MSG_DEBUG ("Could not get address for clid "
412  << itemProxy->clID() << " " << itemProxy->name());
413  return( StatusCode::FAILURE);
414  }
415 
416  // Convert IOpaqueAddress to string via the persistency
417  // service. And then remove header to extract the token.
418  std::string saddr;
419 
420  StatusCode sc = m_persSvc->convertAddress(addr, saddr);
421  if (sc.isFailure())
422  {
424  ("Could not get string from IOpaqueAddress for clid " << id
425  << " " << key
426  << " is BAD_STORAGE_TYPE: "<< (sc == IConversionSvc::Status::BAD_STORAGE_TYPE));
427  return( StatusCode::FAILURE);
428  }
429 
430 
431  // We assume here some knowledge of the form of the AthenaPool
432  // string address
433  std::string hdr;
434  sc = splitAddress(saddr, " /> ", hdr, ref);
435  if (sc.isFailure())
436  {
437  ATH_MSG_ERROR ("Could not get split off token. string address " << saddr);
438  return( StatusCode::FAILURE);
439  }
440 
441  ATH_MSG_DEBUG ("String address " << ref);
442 
443  return StatusCode::SUCCESS;
444 }

◆ initCollection()

StatusCode AANTupleStream::initCollection ( )
private

Initialize the output collection.

Definition at line 132 of file AANTupleStream.cxx.

133 {
134  // write schema
136 
137  // setup TTree
138  setupTree();
139 
140  // setup Token
141  m_tokenBranch = m_tree->GetBranch(c_tokenBranchName);
142  m_tokenBranch->SetAddress(m_tokenCString);
143 
144  return StatusCode::SUCCESS;
145 }

◆ initialize()

StatusCode AANTupleStream::initialize ( )
virtual

Initialize AANTupleStream.

Definition at line 79 of file AANTupleStream.cxx.

80 {
81  ATH_MSG_DEBUG ("In initialize ");
82  // register with the I/O component manager
83  {
84  ServiceHandle<IIoComponentMgr> iomgr ("IoComponentMgr", this->name());
85  ATH_CHECK( iomgr.retrieve() );
86  ATH_CHECK( iomgr->io_register (this) );
87 
88  if ( !iomgr->io_register (this,
90  m_fileName).isSuccess() ) {
91  ATH_MSG_ERROR ("Could not register [" << this->name() << "]["
92  << m_fileName << "] with the I/O component manager !");
93  return StatusCode::FAILURE;
94  }
95  }
96 
97  // StoreGateSvc
99 
100  // set up the persistency service:
101  ATH_CHECK( m_persSvc.retrieve() );
102 
103  // instantiate AttrListSpec and add attributes for Run# and Event#
104  m_attribSpec = new coral::AttributeListSpecification;
105  m_attribSpec->extend( name_RunNumber, "unsigned int" );
106  m_attribSpec->extend( name_EventNumber, "unsigned int" );
107 
108  // Add on specification for extra refs
109  for (const std::string& ref : m_extraRefNames.value())
110  {
111  // Append _ref to name of attribute
112  m_attribSpec->extend(ref + "_ref", "string");
113  }
114 
115  if (!m_lateSchema) {
116  ATH_CHECK( initSchema() );
117  }
118 
119  // initialize sub-algos
121 
122  // get filters
123  ATH_CHECK( getFilters() );
124 
125  ATH_MSG_DEBUG ("End initialize ");
126 
128 }

◆ initialize_subAlgos()

StatusCode AANTupleStream::initialize_subAlgos ( )
private

initialize sub-algos

Definition at line 529 of file AANTupleStream.cxx.

530 {
531  StatusCode sc = StatusCode::SUCCESS;
532 
533  Algorithm* algo;
534  for (const std::string& name : m_membersNames)
535  {
536  // Parse the name for a syntax of the form:
537  //
538  // <type>/<name>
539  //
540  // Where <name> is the algorithm instance name, and <type> is the
541  // algorithm class type (being a subclass of Algorithm).
542  Gaudi::Utils::TypeNameString tn(name);
543 
544  // create sub-algorithm
545  ATH_MSG_INFO (" -> creating sub-algorithm " << name);
546  sc = createSubAlgorithm( tn.type(), tn.name(), algo );
547  if (sc.isFailure())
548  {
549  ATH_MSG_FATAL (" ERROR creating sub-alg." << name);
550  return StatusCode::FAILURE;
551  }
552  }
553 
554  return sc;
555 }

◆ initSchema()

StatusCode AANTupleStream::initSchema ( )
private

dump

Definition at line 639 of file AANTupleStream.cxx.

640 {
641  m_schemaDone = true;
642 
643  ATH_CHECK( m_tHistSvc.retrieve() );
644 
645  // initialize output collection
647 
648  // register TTree to THistSvc
649  ATH_CHECK( m_tHistSvc->regTree("/"+m_streamName+"/"+m_treeName, m_tree) );
650 
652  m_tree->Print();
653 
654  return StatusCode::SUCCESS;
655 }

◆ inputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< Gaudi::Sequence > >::inputHandles
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ io_reinit()

StatusCode AANTupleStream::io_reinit ( )
private

callback method to reinitialize the internal state of the component for I/O purposes (e.g.

upon fork(2))

Definition at line 658 of file AANTupleStream.cxx.

659 {
660  ServiceHandle<IIoComponentMgr> iomgr ("IoComponentMgr", this->name());
661  ATH_CHECK( iomgr.retrieve() );
662 
663  ServiceHandle<Gaudi::Interfaces::IOptionsSvc> josvc ("JobOptionsSvc", this->name());
664  ATH_CHECK( josvc.retrieve() );
665 
666  // check the I/O manager knows about me
667  if ( !iomgr->io_hasitem (this) ) {
668  ATH_MSG_ERROR ("I/O component mgr does not know about ourselves !");
669  return StatusCode::FAILURE;
670  }
671 
672  // check there is actually something to do...
673  if ( !iomgr->io_contains (this, m_fileName) ) {
675  ("I/O component mgr does not have any entry about ["<< m_fileName<<"]");
676  return StatusCode::SUCCESS;
677  }
678 
679  if ( !iomgr->io_retrieve (this, m_fileName).isSuccess() ) {
680  ATH_MSG_ERROR ("Could not retrieve new name for [" << m_fileName << "] !");
681  return StatusCode::FAILURE;
682  }
683 
684  // recreate the proper property value...
685  std::vector<std::string> outvec = {"AANT DATAFILE='" + m_fileName + "' OPT='RECREATE'"};
686  josvc->set("THistSvc.Output", Gaudi::Utils::toString(outvec));
687 
688  // handle schema...
689  if (!m_schemaDone) {
690  if ( !initSchema().isSuccess() ) {
691  ATH_MSG_ERROR ("Could not initialize schema !");
692  }
693  }
694 
695  return StatusCode::SUCCESS;
696 }

◆ isEventAccepted()

bool AANTupleStream::isEventAccepted ( ) const
private

check filters passed

Definition at line 619 of file AANTupleStream.cxx.

620 {
621  // no filter
622  if (m_acceptAlgs.empty())
623  return true;
624 
625  const EventContext& ctx = Gaudi::Hive::currentContext();
626 
627  // loop over all algs
628  for (const IAlgorithm* alg : m_acceptAlgs)
629  {
630  if ( alg->execState(ctx).state() == AlgExecState::State::Done &&
631  ( ! alg->execState(ctx).filterPassed() ) )
632  return false;
633  }
634 
635  return true;
636 }

◆ isReEntrant()

bool Athena::details::AthLegacySequenceAdapter::isReEntrant ( ) const
inlinefinaloverrideprotectedinherited

Definition at line 41 of file AthLegacySequence.h.

41 { return false; }

◆ msg() [1/2]

MsgStream& AthCommonMsg< Gaudi::Sequence >::msg
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

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

◆ msg() [2/2]

MsgStream& AthCommonMsg< Gaudi::Sequence >::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< Gaudi::Sequence >::msgLvl ( const MSG::Level  lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

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

◆ outputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< Gaudi::Sequence > >::outputHandles
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ renounce()

std::enable_if_t<std::is_void_v<std::result_of_t<decltype(&T::renounce)(T)> > && !std::is_base_of_v<SG::VarHandleKeyArray, T> && std::is_base_of_v<Gaudi::DataHandle, T>, void> AthCommonDataStore< AthCommonMsg< Gaudi::Sequence > >::renounce ( T &  h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381  {
382  h.renounce();
383  PBASE::renounce (h);
384  }

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< Gaudi::Sequence > >::renounceArray ( SG::VarHandleKeyArray handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364  {
365  handlesArray.renounce();
366  }

◆ setupTree()

void AANTupleStream::setupTree ( )
private

setup Tree

Definition at line 339 of file AANTupleStream.cxx.

340 {
341  static const std::map<std::string,char> typeDict = {
342  {"double", 'D'},
343  {"long double", 'D'}, // only 64 bit doubles are supported
344  {"float", 'F'},
345  {"int", 'i'},
346  {"unsigned int", 'I'},
347  {"long", 'i'}, // support for 64 bit integers introduced with ROOT 4.00/08
348  {"unsigned long", 'I'}, // support for 64 bit integers introduced with ROOT 4.00/08
349  {"short", 's'},
350  {"unsigned short", 'S'},
351  {"char", 'b'}, // AttributeLists's "get_root_type_char(...)" returned 'C' ???
352  {"unsigned char", 'B'}, // AttributeLists's "get_root_type_char(...)" returned 's' ???
353  {"bool", 'B'}, // AttributeLists's "get_root_type_char(...)" returned 'i' ???
354  {"string", 'C'},
355  {"Token", 'C'}
356  };
357 
358  // go to the root dir of output file
359  TDirectory::TContext save;
360  gDirectory->cd((m_fileName+":/").c_str());
361 
362  // instantiate TTree
363  m_tree = new TTree(m_treeName.c_str(), m_treeName.c_str());
364 
365  // add branches for attributes
366  for(coral::AttributeListSpecification::const_iterator iter=m_attribSpec->begin(); iter!=m_attribSpec->end(); ++iter)
367  {
368  std::string type = "/?";
369  type[1] = typeDict.at(iter->typeName());
370  std::string leaflist = iter->name() + type;
371  m_tree->Branch(iter->name().c_str(),0,leaflist.c_str());
372  }
373 
374  // add Token branch
375  std::string leaflist = c_tokenBranchName;
376  leaflist += "/C";
377  m_tree->Branch(c_tokenBranchName,0,leaflist.c_str());
378 
379  // set TTree
381 }

◆ splitAddress()

StatusCode AANTupleStream::splitAddress ( const std::string &  address,
const std::string &  match,
std::string &  address_header,
std::string &  address_data 
) const
private

Split the address to get pool token.

Definition at line 449 of file AANTupleStream.cxx.

453 {
454  ATH_MSG_DEBUG ("splitAddress " << endmsg
455  << " address : " << address
456  << " match : " << match);
457 
458  std::string::size_type p1;
459 
460  p1 = address.find( match );
461  if (p1 != std::string::npos)
462  {
463  address_header = address.substr( 0, p1+match.size());
464 
465  address_data = address.substr( p1+match.size() );
466  }
467  else
468  {
469  return StatusCode::FAILURE;
470  }
471 
472  ATH_MSG_DEBUG (" address_header : " << address_header
473  << endmsg
474  << " address_data : " << address_data);
475 
476  return StatusCode::SUCCESS;
477 }

◆ sysInitialize()

virtual StatusCode AthCommonDataStore< AthCommonMsg< Gaudi::Sequence > >::sysInitialize
overridevirtualinherited

Perform system initialization for an algorithm.

We override this to declare all the elements of handle key arrays at the end of initialization. See comments on updateVHKA.

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< Gaudi::Sequence > >::sysStart
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< Gaudi::Sequence > >::updateVHKA ( Gaudi::Details::PropertyBase &  )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308  {
309  // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310  // << " size: " << m_vhka.size() << endmsg;
311  for (auto &a : m_vhka) {
312  std::vector<SG::VarHandleKey*> keys = a->keys();
313  for (auto k : keys) {
314  k->setOwner(this);
315  }
316  }
317  }

◆ writeAttributeListSpecification()

void AANTupleStream::writeAttributeListSpecification ( )
private

write schema of AttributeList

Definition at line 322 of file AANTupleStream.cxx.

323 {
324  // go to the root dir of output file
325  TDirectory::TContext save;
326  gDirectory->cd((m_fileName+":/").c_str());
327 
329  // store schema in the schema object
330  for( coral::AttributeListSpecification::const_iterator iter = m_attribSpec->begin();
331  iter != m_attribSpec->end(); ++iter) {
332  all.m_layout.push_back( make_pair( iter->name(), iter->typeName() ) );
333  }
334  // write schema object
335  all.Write(c_attributeListLayoutName);
336 }

◆ writeTokenAttrList()

bool AANTupleStream::writeTokenAttrList ( const std::string &  token,
const coral::AttributeList &  attributeList 
)
private

write Token and AttributeList

Definition at line 481 of file AANTupleStream.cxx.

482 {
483  // set addresses for attributes
484  coral::AttributeList::const_iterator attIter = attributeList.begin();
485  const TObjArray* branches = m_tree->GetListOfBranches();
486  std::vector<std::string> tokenStringDump;
487  // loop over all attributes
488  for (unsigned int i=0; i<attributeList.size(); ++i)
489  {
490  TBranch* branch = (TBranch*)branches->UncheckedAt(i);
491  // string attributes
492  if (attIter->specification().type() == typeid(std::string))
493  {
494  const std::string& str = attIter->data<std::string>();
495  if( str.length()+1 >= s_maxLengthOfStrings )
496  {
497  throw std::runtime_error("String is too long : RootCollection::pool2Root<std::string>");
498  }
499  branch->SetAddress( (void*)str.c_str() );
500  }
501  // Token
502  else if(attIter->specification().typeName() == "Token")
503  {
504  tokenStringDump.push_back( attIter->data<std::string>() );
505  branch->SetAddress( (void*) tokenStringDump.back().c_str() );
506  }
507  // else
508  else
509  {
510  branch->SetAddress( (void*)attIter->addressOfData() );
511  }
512  ++attIter;
513  }
514 
515  // set address for Token
516  m_tokenBranch->SetAddress((void*)token.c_str());
517 
518  // fill TTree
519  m_tree->Fill();
520 
521  // releases Token
522  m_tokenBranch->SetAddress(m_tokenCString);
523 
524  return true;
525 }

Member Data Documentation

◆ m_acceptAlgs

std::vector<IAlgorithm*> AANTupleStream::m_acceptAlgs
private

Vector of Algorithms that this stream accepts.

Definition at line 133 of file AANTupleStream.h.

◆ m_acceptNames

std::vector<std::string> AANTupleStream::m_acceptNames
private

Vector of names of Algorithms that this stream accepts.

Definition at line 130 of file AANTupleStream.h.

◆ m_attribSpec

coral::AttributeListSpecification* AANTupleStream::m_attribSpec
private

Collection attribute specification.

Definition at line 100 of file AANTupleStream.h.

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Gaudi::Sequence > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Gaudi::Sequence > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_existDH

BooleanProperty AANTupleStream::m_existDH
private

Flag to signal whether data header exists.

Definition at line 112 of file AANTupleStream.h.

◆ m_extendedExtraObjects

DataObjIDColl Athena::details::AthLegacySequenceAdapter::m_extendedExtraObjects
privateinherited

Definition at line 51 of file AthLegacySequence.h.

◆ m_extraRefNames

StringArrayProperty AANTupleStream::m_extraRefNames
private

Vector of extra parent ref names to register in collection.

Definition at line 106 of file AANTupleStream.h.

◆ m_fileName

std::string AANTupleStream::m_fileName
private

Name of the output collection.

Definition at line 103 of file AANTupleStream.h.

◆ m_lateSchema

BooleanProperty AANTupleStream::m_lateSchema
private

write schema in execute()

Definition at line 118 of file AANTupleStream.h.

◆ m_macro

std::string AANTupleStream::m_macro
private

macro

Definition at line 121 of file AANTupleStream.h.

◆ m_membersNames

std::vector<std::string> AANTupleStream::m_membersNames
private

Definition at line 145 of file AANTupleStream.h.

◆ m_persSvc

ServiceHandle<IAddressCreator> AANTupleStream::m_persSvc
private

Persistency service.

Definition at line 97 of file AANTupleStream.h.

◆ m_schemaDone

bool AANTupleStream::m_schemaDone
private

first event

Definition at line 124 of file AANTupleStream.h.

◆ m_streamName

std::string AANTupleStream::m_streamName
private

Name of Stream.

Definition at line 115 of file AANTupleStream.h.

◆ m_tHistSvc

ServiceHandle<ITHistSvc> AANTupleStream::m_tHistSvc
private

THistSvc.

Definition at line 142 of file AANTupleStream.h.

◆ m_tokenBranch

TBranch* AANTupleStream::m_tokenBranch
private

TBranch which contains Token info.

Definition at line 139 of file AANTupleStream.h.

◆ m_tokenCString

char AANTupleStream::m_tokenCString[s_maxLengthOfStrings]
private

Definition at line 149 of file AANTupleStream.h.

◆ m_tree

TTree* AANTupleStream::m_tree
private

TTree.

Definition at line 136 of file AANTupleStream.h.

◆ m_treeName

std::string AANTupleStream::m_treeName
private

Name of the output tree.

Definition at line 127 of file AANTupleStream.h.

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< Gaudi::Sequence > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< Gaudi::Sequence > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.

◆ m_writeInputDH

BooleanProperty AANTupleStream::m_writeInputDH
private

Flag to signal whether or not to write input data header.

Definition at line 109 of file AANTupleStream.h.

◆ s_maxLengthOfStrings

const unsigned int AANTupleStream::s_maxLengthOfStrings = 5000
staticprivate

for string branches

Definition at line 148 of file AANTupleStream.h.


The documentation for this class was generated from the following files:
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
AllowedVariables::e
e
Definition: AsgElectronSelectorTool.cxx:37
python.tests.PyTestsLib.finalize
def finalize(self)
_info( "content of StoreGate..." ) self.sg.dump()
Definition: PyTestsLib.py:50
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
SGout2dot.alg
alg
Definition: SGout2dot.py:243
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
find
std::string find(const std::string &s)
return a remapped string
Definition: hcg.cxx:135
AthCommonDataStore< AthCommonMsg< Gaudi::Sequence > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
initialize
void initialize()
Definition: run_EoverP.cxx:894
AANTupleStream::writeTokenAttrList
bool writeTokenAttrList(const std::string &token, const coral::AttributeList &attributeList)
write Token and AttributeList
Definition: AANTupleStream.cxx:481
AthCommonDataStore::renounce
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce(T &h)
Definition: AthCommonDataStore.h:380
TRTCalib_cfilter.p1
p1
Definition: TRTCalib_cfilter.py:130
skel.it
it
Definition: skel.GENtoEVGEN.py:396
pool::WRITE
@ WRITE
Definition: Database/APR/StorageSvc/StorageSvc/pool.h:72
AthCommonDataStore< AthCommonMsg< Gaudi::Sequence > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
AthCommonDataStore< AthCommonMsg< Gaudi::Sequence > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
AANTupleStream::setupTree
void setupTree()
setup Tree
Definition: AANTupleStream.cxx:339
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
python.PyKernel.AttributeList
AttributeList
Definition: PyKernel.py:36
AANTupleStream::getRef
StatusCode getRef(CLID id, const std::string &key, std::string &ref)
Get ref from a proxy.
Definition: AANTupleStream.cxx:385
AANTupleStream::m_acceptAlgs
std::vector< IAlgorithm * > m_acceptAlgs
Vector of Algorithms that this stream accepts.
Definition: AANTupleStream.h:133
Athena::details::AthLegacySequenceAdapter::m_extendedExtraObjects
DataObjIDColl m_extendedExtraObjects
Definition: AthLegacySequence.h:51
TruthTest.itE
itE
Definition: TruthTest.py:25
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
AANTupleStream::m_membersNames
std::vector< std::string > m_membersNames
Definition: AANTupleStream.h:145
AANTupleStream::splitAddress
StatusCode splitAddress(const std::string &address, const std::string &match, std::string &address_header, std::string &address_data) const
Split the address to get pool token.
Definition: AANTupleStream.cxx:449
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:29
AANTupleStream::m_persSvc
ServiceHandle< IAddressCreator > m_persSvc
Persistency service.
Definition: AANTupleStream.h:97
AANTupleStream::writeAttributeListSpecification
void writeAttributeListSpecification()
write schema of AttributeList
Definition: AANTupleStream.cxx:322
runLayerRecalibration.branches
list branches
Definition: runLayerRecalibration.py:98
AthCommonDataStore< AthCommonMsg< Gaudi::Sequence > >::evtStore
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:85
AANTupleStream::m_tokenBranch
TBranch * m_tokenBranch
TBranch which contains Token info.
Definition: AANTupleStream.h:139
checkTP.save
def save(self, fileName="./columbo.out")
Definition: checkTP.py:178
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
AthCommonDataStore
Definition: AthCommonDataStore.h:52
Amg::toString
std::string toString(const Translation3D &translation, int precision=4)
GeoPrimitvesToStringConverter.
Definition: GeoPrimitivesToStringConverter.h:40
SG::DataProxy::address
virtual IOpaqueAddress * address() const override final
Retrieve IOpaqueAddress.
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
AANTupleStream::isEventAccepted
bool isEventAccepted() const
check filters passed
Definition: AANTupleStream.cxx:619
AthLegacySequence
Alias for backward compatibility.
Definition: AthLegacySequence.h:63
ParseInputs.gDirectory
gDirectory
Definition: Final2012/ParseInputs.py:133
AANTupleStream::m_macro
std::string m_macro
macro
Definition: AANTupleStream.h:121
DataHeader
This class provides the layout for summary information stored for data written to POOL.
Definition: DataHeader.h:124
lumiFormat.i
int i
Definition: lumiFormat.py:85
AANTupleStream::initSchema
StatusCode initSchema()
Definition: AANTupleStream.cxx:639
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
EventInfo::event_ID
EventID * event_ID()
the unique identification of the event.
Definition: EventInfo/EventInfo/EventInfo.h:224
DataHeader::sizeProvenance
int sizeProvenance() const
Definition: DataHeader.cxx:281
ClassID_traits
Default, invalid implementation of ClassID_traits.
Definition: Control/AthenaKernel/AthenaKernel/ClassID_traits.h:40
calibdata.exception
exception
Definition: calibdata.py:496
AANTupleStream::getFilters
StatusCode getFilters()
get filter alogs
Definition: AANTupleStream.cxx:587
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
AANTupleStream::m_tree
TTree * m_tree
TTree.
Definition: AANTupleStream.h:136
AANTupleStream::m_schemaDone
bool m_schemaDone
first event
Definition: AANTupleStream.h:124
AthCommonDataStore< AthCommonMsg< Gaudi::Sequence > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
xAOD::eventNumber
eventNumber
Definition: EventInfo_v1.cxx:124
AANTupleStream::m_treeName
std::string m_treeName
Name of the output tree.
Definition: AANTupleStream.h:127
SG::DataProxy::clID
CLID clID() const
Retrieve clid.
AANTupleStream::m_streamName
std::string m_streamName
Name of Stream.
Definition: AANTupleStream.h:115
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
AANTupleStream::m_tokenCString
char m_tokenCString[s_maxLengthOfStrings]
Definition: AANTupleStream.h:149
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition: HandleClassifier.h:54
AANTupleStream::m_attribSpec
coral::AttributeListSpecification * m_attribSpec
Collection attribute specification.
Definition: AANTupleStream.h:100
AANTupleStream::s_maxLengthOfStrings
static const unsigned int s_maxLengthOfStrings
for string branches
Definition: AANTupleStream.h:148
AANTupleStream::initCollection
StatusCode initCollection()
Initialize the output collection.
Definition: AANTupleStream.cxx:132
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
AANTupleStream::m_extraRefNames
StringArrayProperty m_extraRefNames
Vector of extra parent ref names to register in collection.
Definition: AANTupleStream.h:106
WriteBchToCool.beg
beg
Definition: WriteBchToCool.py:69
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
EventInfo
This class provides general information about an event. Event information is provided by the accessor...
Definition: EventInfo/EventInfo/EventInfo.h:43
SG::DataProxy::name
virtual const name_type & name() const override final
Retrieve data object key == string.
RTTAlgmain.address
address
Definition: RTTAlgmain.py:55
Cut::all
@ all
Definition: SUSYToolsAlg.cxx:67
xAOD::EventInfo_v1
Class describing the basic event information.
Definition: EventInfo_v1.h:43
AANTupleStream::m_lateSchema
BooleanProperty m_lateSchema
write schema in execute()
Definition: AANTupleStream.h:118
DeMoAtlasDataLoss.runNumber
string runNumber
Definition: DeMoAtlasDataLoss.py:64
RTTAlgmain.branch
branch
Definition: RTTAlgmain.py:61
AttributeListLayout
Definition: AttributeListLayout.h:19
a
TList * a
Definition: liststreamerinfos.cxx:10
h
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
ref
const boost::regex ref(r_ef)
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:623
AANTupleStream::execute_subAlgos
StatusCode execute_subAlgos()
execute sub-algos
Definition: AANTupleStream.cxx:559
str
Definition: BTagTrackIpAccessor.cxx:11
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
AANTupleStream::m_tHistSvc
ServiceHandle< ITHistSvc > m_tHistSvc
THistSvc.
Definition: AANTupleStream.h:142
merge.status
status
Definition: merge.py:17
AANTupleStream::m_acceptNames
std::vector< std::string > m_acceptNames
Vector of names of Algorithms that this stream accepts.
Definition: AANTupleStream.h:130
SG::DataProxy
Definition: DataProxy.h:45
AANTTreeMap::setTree
static void setTree(const std::string &stream, TTree *tree)
Definition: AANTTreeMap.h:18
SG::ConstIterator
Definition: SGIterator.h:163
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
AANTupleStream::m_writeInputDH
BooleanProperty m_writeInputDH
Flag to signal whether or not to write input data header.
Definition: AANTupleStream.h:109
AANTupleStream::initialize_subAlgos
StatusCode initialize_subAlgos()
initialize sub-algos
Definition: AANTupleStream.cxx:529
match
bool match(std::string s1, std::string s2)
match the individual directories of two strings
Definition: hcg.cxx:356
fitman.k
k
Definition: fitman.py:528
AANTupleStream::m_existDH
BooleanProperty m_existDH
Flag to signal whether data header exists.
Definition: AANTupleStream.h:112
ServiceHandle< IIoComponentMgr >
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37
AANTupleStream::m_fileName
std::string m_fileName
Name of the output collection.
Definition: AANTupleStream.h:103