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

#include <VP1Alg.h>

Inheritance diagram for VP1Alg:
Collaboration diagram for VP1Alg:

Public Member Functions

 VP1Alg (const std::string &name, ISvcLocator *pSvcLocator)
 
 ~VP1Alg ()
 
virtual StatusCode initialize () override
 
virtual StatusCode execute () override
 
virtual StatusCode finalize () override
 
void handle (const Incident &inc) override
 
virtual StatusCode sysInitialize () override
 Override sysInitialize. More...
 
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies. More...
 
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 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

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

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

Gaudi::Property< std::string > m_atlasRelease {this, "AtlasRelease", "", "The current, in use Atlas release"}
 
Gaudi::Property< bool > m_mfOn
 
Gaudi::Property< int > m_mfLimit
 
Gaudi::Property< std::string > m_mfSourceDir
 
Gaudi::Property< std::string > m_mfLocalCopyDir
 
Gaudi::Property< std::vector< std::string > > m_mfAvailableLocalInputDirectories
 
Gaudi::Property< std::string > m_cruiseInitialMode
 
Gaudi::Property< unsigned > m_cruiseInitialUpdateSeconds {this, "CruiseInitialSeconds", 10, "Cruise mode -- Initial Cruise update time, in seconds. Default: 10"}
 
Gaudi::Property< std::vector< std::string > > m_initialvp1files
 
Gaudi::Property< bool > m_noGui
 
VP1Guim_vp1gui
 
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
 

Detailed Description

Definition at line 31 of file VP1Alg.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< Algorithm > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ VP1Alg()

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

Definition at line 28 of file VP1Alg.cxx.

28  :
29  AthAlgorithm(name, svcLocator),
30  m_vp1gui(0)
31 {
32 
33 
34  /*
35  // This is Work In Progress
36  // Those properties are needed in VP1 configurations, which
37  // still need to be migrated to CA.
38  // See the header file for details.
39  //
40  declareProperty("InitiallyLoadedVP1Files",m_initialvp1files);
41  declareProperty("InitialCruiseMode",m_initialCruiseMode="NONE");
42  declareProperty("InitialCruiseModePeriod",m_initialCruiseSeconds=10);
43 
44  declareProperty("NoGui",m_noGui=false);
45 
46  // **** MF ****
47  declareProperty("MultipleFilesON",m_mfOn=false);
48  declareProperty("MFNumFileLimit",m_mfLimit=10);
49  declareProperty("MFSourceDir",m_mfSourceDir="");
50  declareProperty("MFLocalCopyDir",m_mfLocalCopyDir="");
51  declareProperty("MFAvailableLocalInputDirectories",m_mfAvailableLocalInputDirectories);
52 */
53 
54  // Two ways of running in multiple files mode:
55  //
56  // 1) Source is directory on filesystem (e.g. for use in the control room).
57  // * MFSourceDir indicates the directory where files can be found.
58  // * MFLocalCopyDir indicates the temporary directory where
59  // files are copied before we tell pool to get them there.
60  // 2) Source is web directory
61  // * MFSourceDir indicates http url to small text file (to be
62  // parsed by VP1Gui/VP1EvtsOnServerInfo), with a list of
63  // available files (assumed to be in the same dir).
64  // Example value: "http://pcatdwww.cern.ch/atlas-point1/vp1events/fileinfo.txt"
65  // * MFLocalCopyDir has same meaning as before, but this time a
66  // subdirectory of it, "active_downloads", will be used to
67  // download files before they are subsequently moved to
68  // MFLocalCopyDir itself.
69 
70  // **** MF ****
71 
72  // Pick up patched Coin
73  ::setenv("LCGPATCH_COINMULTISELECT","1",1);
74 }

◆ ~VP1Alg()

VP1Alg::~VP1Alg ( )

Definition at line 77 of file VP1Alg.cxx.

78 {
79 }

Member Function Documentation

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Algorithm > >::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< Algorithm > >::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< Algorithm > >::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< Algorithm > >::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< Algorithm > >::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< Algorithm > >::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< Algorithm > >::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< Algorithm > >::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< Algorithm > >::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< Algorithm > >::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< Algorithm > >::detStore ( ) const
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< Algorithm > >::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< Algorithm > >::evtStore ( ) const
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 VP1Alg::execute ( )
overridevirtual

Definition at line 122 of file VP1Alg.cxx.

123 {
124 
125  // Here you do everything that needs to be done on every single
126  // events, e.g. read input variables, apply cuts, and fill
127  // histograms and trees, if any.
128 
129  msg(MSG::DEBUG) <<" in execute() " << endmsg;
130 
131  if (!m_vp1gui)
132  return StatusCode::FAILURE;
133 
134  if (!m_noGui&&!m_vp1gui->hasBeenInitialised()) {
135  m_vp1gui->init();//Launch!
136  }
137 
138 
139 
140 
141  unsigned int trigType = 0;
142 
143  // retrieve the eventInfo object from the event store
144  const xAOD::EventInfo *eventInfo = nullptr;
145  StatusCode status = evtStore()->retrieve (eventInfo, "EventInfo");
146 
147  if(status.isSuccess()) {
148  // Get run/event number:
149  const unsigned long long eventNumber = eventInfo->eventNumber();
150  const uint32_t runNumber = eventInfo->runNumber();
151  msg(MSG::DEBUG) << " Got run number = " << runNumber
152  << ", event number = " << eventNumber << endmsg;
153 
154  trigType = eventInfo->level1TriggerType();
155 
156  // Get time stamp:
157  uint32_t time = eventInfo->timeStamp();//0 means no info.
158 
160  return StatusCode::SUCCESS;
161  } else {
162  msg(MSG::INFO) << " Ending application gracefully." << endmsg;
163  return StatusCode::FAILURE;
164  }
165  return StatusCode::SUCCESS;
166  }
167 
168  msg(MSG::DEBUG) << " Unable to retrieve EventInfo from StoreGate... using dummy values" << endmsg;
169 
170  if (m_noGui||m_vp1gui->executeNewEvent(999,999,trigType,0)) {
171  return StatusCode::SUCCESS;
172  } else {
173  msg(MSG::INFO) << " Ending application gracefully." << endmsg;
174  return StatusCode::FAILURE;
175  }
176 
177  return StatusCode::SUCCESS;
178 
179 }

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< Algorithm > >::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 & AthAlgorithm::extraOutputDeps ( ) const
overridevirtualinherited

Return the list of extra output dependencies.

This list is extended to include symlinks implied by inheritance relations.

Definition at line 50 of file AthAlgorithm.cxx.

51 {
52  // If we didn't find any symlinks to add, just return the collection
53  // from the base class. Otherwise, return the extended collection.
54  if (!m_extendedExtraObjects.empty()) {
56  }
57  return Algorithm::extraOutputDeps();
58 }

◆ finalize()

StatusCode VP1Alg::finalize ( )
overridevirtual

Definition at line 182 of file VP1Alg.cxx.

183 {
184  msg(MSG::INFO) <<" in finalize() " << endmsg;
185 
186  if (!m_vp1gui)
187  return StatusCode::FAILURE;
188 
189  if (!m_noGui)
190  m_vp1gui->cleanup();
191  delete m_vp1gui;
192 
193  return StatusCode::SUCCESS;
194 }

◆ handle()

void VP1Alg::handle ( const Incident &  inc)
override

Definition at line 197 of file VP1Alg.cxx.

198 {
199  msg(MSG::INFO) << "Handling incident '" << inc.type() << "'" << endmsg;
200 
201  if (!m_vp1gui) {
202  msg(MSG::INFO) << "Aborting due to null VP1Gui pointer." << endmsg;
203  return;
204  }
205 
206  const FileIncident* fileInc = dynamic_cast<const FileIncident*>(&inc);
207  if(fileInc == 0) {
208  msg(MSG::WARNING) << " Unable to cast to file incident" << endmsg;
209  return;
210  }
211  else
212  msg(MSG::DEBUG) << " Casting to file incident successful" << endmsg;
213 
214  // Locate the EventSelector
215  ServiceHandle<IEvtSelector> pEvtSelector("EventSelector", this->name());
216  StatusCode sc = pEvtSelector.retrieve();
217 
218  if(!sc.isSuccess() || 0 == pEvtSelector) {
219  msg(MSG::WARNING) << "Could not find EventSelector" << endmsg;
220  return;
221  }
222  else
223  msg(MSG::DEBUG) << " Got EventSelector" << endmsg;
224 
225  IProperty* propertyServer = dynamic_cast<IProperty*>(pEvtSelector.operator->());
226  if (!propertyServer) {
227  msg(MSG::WARNING) << "Could not get propertyServer" << endmsg;
228  return;
229  }
230 
231  std::vector<std::string> vect;
232  StringArrayProperty inputCollections("InputCollections", vect);
233 
234  sc = propertyServer->getProperty(&inputCollections);
235  if(!sc.isSuccess()) {
236  msg(MSG::INFO) << "Could not get InputCollections property" << endmsg;
237  return;
238  }
239  else
240  msg(MSG::DEBUG) << " Got InputCollections property" << endmsg;
241 
242  for (const std::string& s : inputCollections.value()) {
243  if(s != fileInc->fileName())
244  vect.push_back(s);
245  }
246 
247  if(m_mfOn) {
248  std::string strNewFileName = m_vp1gui->nextRequestedEventFile();
249 
250  if (strNewFileName.empty())
251  return;
252  if (!VP1FileUtilities::fileExistsAndReadable(strNewFileName)) {
253  msg(MSG::WARNING) << " File requested by VP1 does not exists or is not readable: "<<strNewFileName<<". Ending." << endmsg;
254  return;
255  }
256 
257  vect.push_back(strNewFileName);
258  msg(MSG::INFO) << " Setting next event file: " << strNewFileName<< endmsg;
259  }
260  else {
261  std::vector<std::string> strNewFileNames = m_vp1gui->userRequestedFiles();
262  for(unsigned i=0; i<strNewFileNames.size(); ++i) {
263  const std::string& strNewFileName = strNewFileNames[i];
264  if (strNewFileName.empty())
265  continue;
266  if (!VP1FileUtilities::fileExistsAndReadable(strNewFileName)) {
267  msg(MSG::WARNING) << " File requested by VP1 does not exists or is not readable: " << strNewFileName << endmsg;
268  continue;
269  }
270  vect.push_back(strNewFileName);
271  msg(MSG::INFO) << " Setting next event file: " << strNewFileName<< endmsg;
272  }
273  }
274 
275  StringArrayProperty newInputCollections("InputCollections", vect);
276 
277  if(propertyServer->setProperty(newInputCollections)!=StatusCode::SUCCESS)
278  msg(MSG::WARNING) << "Could not set new InputCollections property" << endmsg;
279  else
280  msg(MSG::DEBUG) << " InputCollections property set" << endmsg;
281 }

◆ initialize()

StatusCode VP1Alg::initialize ( )
overridevirtual

Definition at line 82 of file VP1Alg.cxx.

83 {
84  msg(MSG::INFO) << " in initialize() " << endmsg;
85 
87  for (it = m_initialvp1files.begin();it!=itE;++it) {
88  std::string file = PathResolver::find_file (*it, "DATAPATH");
89  if (file=="")
90  file = PathResolver::find_file (*it+".vp1", "DATAPATH");
91  if (file!="")
92  *it = file;
93  }
94 
95  // use the incident service to register a handler
96  SmartIF<IIncidentSvc> incsvc{service("IncidentSvc")};
97  ATH_CHECK( incsvc.isValid() );
98 
99  std::string endfilekey("EndTagFile");
100  incsvc->addListener(this, endfilekey, 0);
101  msg(MSG::DEBUG) << "Added listener on "<<endfilekey << endmsg;
102 
103  //Create VP1 gui object and see if it considers settings to be valid.
104  m_vp1gui = new VP1Gui(&(*evtStore()),&(*detStore()),serviceLocator(),toolSvc(),
108  (m_mfOn ? m_mfSourceDir : ""),
109  (m_mfOn ? m_mfLocalCopyDir : ""),
110  m_mfLimit,
111  ( m_mfOn ? m_mfAvailableLocalInputDirectories : Gaudi::Property<std::vector<std::string>>() ) );
112  if (!m_vp1gui->argumentsAreValid()) {
113  delete m_vp1gui;
114  m_vp1gui = 0;
115  exit(1);//Should we do this? It is kind of nice to not have to dig through the logfile to find the failure.
116  return StatusCode::FAILURE;
117  }
118  return StatusCode::SUCCESS;
119 }

◆ inputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< Algorithm > >::inputHandles ( ) const
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.

◆ msg() [1/2]

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

Definition at line 24 of file AthCommonMsg.h.

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

◆ msg() [2/2]

MsgStream& AthCommonMsg< Algorithm >::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< Algorithm >::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< Algorithm > >::outputHandles ( ) const
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< Algorithm > >::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< Algorithm > >::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  }

◆ sysInitialize()

StatusCode AthAlgorithm::sysInitialize ( )
overridevirtualinherited

Override sysInitialize.

Override sysInitialize from the base class.

Loop through all output handles, and if they're WriteCondHandles, automatically register them and this Algorithm with the CondSvc

Scan through all outputHandles, and if they're WriteCondHandles, register them with the CondSvc

Reimplemented from AthCommonDataStore< AthCommonMsg< Algorithm > >.

Reimplemented in AthAnalysisAlgorithm, AthFilterAlgorithm, PyAthena::Alg, and AthHistogramAlgorithm.

Definition at line 66 of file AthAlgorithm.cxx.

66  {
68 
69  if (sc.isFailure()) {
70  return sc;
71  }
72  ServiceHandle<ICondSvc> cs("CondSvc",name());
73  for (auto h : outputHandles()) {
74  if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
75  // do this inside the loop so we don't create the CondSvc until needed
76  if ( cs.retrieve().isFailure() ) {
77  ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
78  return StatusCode::SUCCESS;
79  }
80  if (cs->regHandle(this,*h).isFailure()) {
81  sc = StatusCode::FAILURE;
82  ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
83  << " with CondSvc");
84  }
85  }
86  }
87  return sc;
88 }

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< Algorithm > >::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< Algorithm > >::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  }

Member Data Documentation

◆ m_atlasRelease

Gaudi::Property<std::string> VP1Alg::m_atlasRelease {this, "AtlasRelease", "", "The current, in use Atlas release"}
private

Definition at line 48 of file VP1Alg.h.

◆ m_cruiseInitialMode

Gaudi::Property<std::string> VP1Alg::m_cruiseInitialMode
private
Initial value:
{this, "CruiseInitialMode", "NONE",
"Cruise mode -- Initial Cruise mode: 'NONE', 'EVENT', 'TAB', 'BOTH'. Default: 'NONE'"}

Definition at line 61 of file VP1Alg.h.

◆ m_cruiseInitialUpdateSeconds

Gaudi::Property<unsigned> VP1Alg::m_cruiseInitialUpdateSeconds {this, "CruiseInitialSeconds", 10, "Cruise mode -- Initial Cruise update time, in seconds. Default: 10"}
private

Definition at line 63 of file VP1Alg.h.

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Algorithm > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Algorithm > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_extendedExtraObjects

DataObjIDColl AthAlgorithm::m_extendedExtraObjects
privateinherited

Definition at line 79 of file AthAlgorithm.h.

◆ m_initialvp1files

Gaudi::Property<std::vector<std::string> > VP1Alg::m_initialvp1files
private
Initial value:
{
this, "InitialInputVP1Files", {}, "a vector of input VP1 files"}

Definition at line 65 of file VP1Alg.h.

◆ m_mfAvailableLocalInputDirectories

Gaudi::Property<std::vector<std::string> > VP1Alg::m_mfAvailableLocalInputDirectories
private
Initial value:
{this, "MFAvailableLocalInputDirectories", {},
"MultipleFiles mode -- Will only be used if sourcedir is set and local"}

Definition at line 58 of file VP1Alg.h.

◆ m_mfLimit

Gaudi::Property<int> VP1Alg::m_mfLimit
private
Initial value:
{this, "MFNumFileLimit", 10,
"MultipleFiles mode -- Maximum number of local copies to keep"}

Definition at line 52 of file VP1Alg.h.

◆ m_mfLocalCopyDir

Gaudi::Property<std::string> VP1Alg::m_mfLocalCopyDir
private
Initial value:
{this, "MFLocalCopyDir", ".",
"MultipleFiles mode -- Path of the directory to keep local copies of processed events. Default '.' (the local run folder)"}

Definition at line 56 of file VP1Alg.h.

◆ m_mfOn

Gaudi::Property<bool> VP1Alg::m_mfOn
private
Initial value:
{this, "MultipleFilesON", false,
"Flag to turn the 'Multiple Files' mode ON/OFF. Default OFF"}

Definition at line 50 of file VP1Alg.h.

◆ m_mfSourceDir

Gaudi::Property<std::string> VP1Alg::m_mfSourceDir
private
Initial value:
{this, "MFSourceDir", "",
"MultipleFiles mode -- Path of the source directory, where input data files are stored and from which events are taken from"}

Definition at line 54 of file VP1Alg.h.

◆ m_noGui

Gaudi::Property<bool> VP1Alg::m_noGui
private
Initial value:
{this, "noGUI", false,
"Flag to turn OFF the GUI. Default: FALSE (i.e., GUI is ON)"}

Definition at line 68 of file VP1Alg.h.

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< Algorithm > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

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

Definition at line 398 of file AthCommonDataStore.h.

◆ m_vp1gui

VP1Gui* VP1Alg::m_vp1gui
private

Definition at line 72 of file VP1Alg.h.


The documentation for this class was generated from the following files:
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
VP1FileUtilities::fileExistsAndReadable
static bool fileExistsAndReadable(const std::string &)
Definition: VP1FileUtilities.cxx:211
VP1Alg::m_vp1gui
VP1Gui * m_vp1gui
Definition: VP1Alg.h:72
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
VP1Gui
Definition: VP1Gui.h:28
xAOD::EventInfo_v1::eventNumber
uint64_t eventNumber() const
The current event's event number.
PathResolver::find_file
static std::string find_file(const std::string &logical_file_name, const std::string &search_path, SearchType search_type=LocalSearch)
Definition: PathResolver.cxx:251
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
VP1Gui::cleanup
void cleanup()
Definition: VP1Gui.cxx:205
VP1Alg::m_initialvp1files
Gaudi::Property< std::vector< std::string > > m_initialvp1files
Definition: VP1Alg.h:65
VP1Gui::init
void init()
Definition: VP1Gui.cxx:181
skel.it
it
Definition: skel.GENtoEVGEN.py:396
AthCommonDataStore< AthCommonMsg< Algorithm > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
VP1Gui::executeNewEvent
bool executeNewEvent(const int &run, const uint64_t &event, const unsigned &triggerType=0, const unsigned &time=0)
Definition: VP1Gui.cxx:212
AthCommonDataStore< AthCommonMsg< Algorithm > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
VP1Alg::m_mfSourceDir
Gaudi::Property< std::string > m_mfSourceDir
Definition: VP1Alg.h:54
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
VP1Alg::m_cruiseInitialMode
Gaudi::Property< std::string > m_cruiseInitialMode
Definition: VP1Alg.h:61
VP1Alg::m_noGui
Gaudi::Property< bool > m_noGui
Definition: VP1Alg.h:68
VP1Alg::m_mfOn
Gaudi::Property< bool > m_mfOn
Definition: VP1Alg.h:50
xAOD::EventInfo_v1::runNumber
uint32_t runNumber() const
The current event's run number.
TruthTest.itE
itE
Definition: TruthTest.py:25
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
AthCommonDataStore< AthCommonMsg< Algorithm > >::detStore
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:95
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:27
AthCommonDataStore< AthCommonMsg< Algorithm > >::evtStore
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:85
TileAANtupleConfig.inputCollections
inputCollections
Definition: TileAANtupleConfig.py:133
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
AthCommonDataStore
Definition: AthCommonDataStore.h:52
AthAlgorithm::sysInitialize
virtual StatusCode sysInitialize() override
Override sysInitialize.
Definition: AthAlgorithm.cxx:66
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
AthCommonDataStore< AthCommonMsg< Algorithm > >::outputHandles
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
lumiFormat.i
int i
Definition: lumiFormat.py:85
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
VP1Alg::m_mfAvailableLocalInputDirectories
Gaudi::Property< std::vector< std::string > > m_mfAvailableLocalInputDirectories
Definition: VP1Alg.h:58
file
TFile * file
Definition: tile_monitor.h:29
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
VP1Gui::hasBeenInitialised
bool hasBeenInitialised()
Definition: VP1Gui.cxx:175
AthCommonDataStore< AthCommonMsg< Algorithm > >::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
getCastorRun.setenv
def setenv()
Definition: getCastorRun.py:9
calibdata.exit
exit
Definition: calibdata.py:236
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition: HandleClassifier.h:54
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
VP1Gui::userRequestedFiles
std::vector< std::string > userRequestedFiles()
Definition: VP1Gui.cxx:237
xAOD::EventInfo_v1
Class describing the basic event information.
Definition: EventInfo_v1.h:43
DeMoAtlasDataLoss.runNumber
string runNumber
Definition: DeMoAtlasDataLoss.py:64
AthAlgorithm::m_extendedExtraObjects
DataObjIDColl m_extendedExtraObjects
Definition: AthAlgorithm.h:79
a
TList * a
Definition: liststreamerinfos.cxx:10
h
CaloSwCorrections.time
def time(flags, cells_name, *args, **kw)
Definition: CaloSwCorrections.py:242
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
DEBUG
#define DEBUG
Definition: page_access.h:11
AthCommonMsg< Algorithm >::msg
MsgStream & msg() const
Definition: AthCommonMsg.h:24
VP1Alg::m_mfLimit
Gaudi::Property< int > m_mfLimit
Definition: VP1Alg.h:52
xAOD::EventInfo_v1::level1TriggerType
uint16_t level1TriggerType() const
The Level-1 trigger type.
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:623
xAOD::EventInfo_v1::timeStamp
uint32_t timeStamp() const
POSIX time in seconds from 1970. January 1st.
VP1Gui::argumentsAreValid
bool argumentsAreValid() const
Definition: VP1Gui.cxx:92
AthAlgorithm::AthAlgorithm
AthAlgorithm()
Default constructor:
VP1Gui::nextRequestedEventFile
std::string nextRequestedEventFile() const
Definition: VP1Gui.cxx:231
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
merge.status
status
Definition: merge.py:17
LHEF::Writer
Pythia8::Writer Writer
Definition: Prophecy4fMerger.cxx:12
VP1Alg::m_mfLocalCopyDir
Gaudi::Property< std::string > m_mfLocalCopyDir
Definition: VP1Alg.h:56
VP1Alg::m_cruiseInitialUpdateSeconds
Gaudi::Property< unsigned > m_cruiseInitialUpdateSeconds
Definition: VP1Alg.h:63
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
fitman.k
k
Definition: fitman.py:528
ServiceHandle< IEvtSelector >