ATLAS Offline Software
Loading...
Searching...
No Matches
CBNTAA_TBInfo Class Reference

#include <CBNTAA_TBInfo.h>

Inheritance diagram for CBNTAA_TBInfo:
Collaboration diagram for CBNTAA_TBInfo:

Public Member Functions

 CBNTAA_TBInfo (const std::string &name, ISvcLocator *pSvcLocator)
virtual ~CBNTAA_TBInfo ()
virtual StatusCode CBNT_initialize () override
virtual StatusCode CBNT_execute () override
virtual StatusCode CBNT_finalize () override
virtual StatusCode initialize () override
virtual StatusCode execute () override
virtual StatusCode finalize () override
virtual StatusCode pre_execute ()
virtual StatusCode sysInitialize () override
 Override sysInitialize.
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies.
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual StatusCode sysStart () override
 Handle START transition.
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles.
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles.
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T, V, H > &t)
void updateVHKA (Gaudi::Details::PropertyBase &)
MsgStream & msg () const
bool msgLvl (const MSG::Level lvl) const

Protected Types

enum  { NOT_VALID = -999 }

Protected Member Functions

template<class T>
void addBranch (const std::string &branchname, T &obj, const std::string &leaflist)
template<class T>
void addBranch (const std::string &branchname, T *&obj)
template<class T>
void addBranch (const std::string &branchname, T *&obj, int bufferSize, int splitLevel)
void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution
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.

Protected Attributes

std::string m_ntpath
std::string m_ntTitle
TTree * m_nt
MsgStream * m_log
const LArEM_IDm_emId
const LArHEC_IDm_hecId
const LArFCAL_IDm_fcalId
const LArOnlineIDm_onlineId

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t

Private Member Functions

float GetEnergy (float CurrB3, float CurrB4)
float GetBdl3 (float current)
float GetBdl4 (float current)
float GetErrColl (float coll3_down, float coll3_up, float coll9_down, float coll9_up)
float GetErrAbsE (float energy)
float GetErrCurr (float currB3, float currB4)
float SyncLoss (float energy, float currB3, float currB4)
float SyncLossErr (float loss)
void calculateAll (int runNumber, int eventNumber)
virtual StatusCode CBNT_clear () override
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

ToolHandle< ICaloCoordinateToolm_coord {this, "CaloCoordinateTool", "TBCaloCoordinate"}
ToolHandle< TBCondRunParToolm_runpar {this, "CondRunParTool", "TBCondRunParTool"}
bool m_DBRead {}
int m_beamener {}
int m_beamtype {}
bool m_computeBeamEnergy {}
bool m_dumpBeamLine {}
float m_B8_Bdl {}
bool m_is_VLE {}
int m_prevrunNum {}
float m_prevEnergy {}
float m_preverrAbsEnergy {}
float m_preverrCollimators {}
float m_preverrCurrents {}
float m_prevsycLoss {}
float m_preverrSycLoss {}
float m_prevB3 {}
float m_prevB4 {}
float m_prevB8 {}
double m_runEta_nt {}
long m_runParticleType_nt {}
long m_runEnergy_nt {}
std::vector< float > * m_quad_file {}
std::vector< float > * m_quad_equip {}
std::vector< float > * m_bend_file {}
std::vector< float > * m_bend_equip {}
std::vector< float > * m_trim_file {}
std::vector< float > * m_trim_equip {}
std::vector< float > * m_coll_file {}
std::vector< float > * m_coll_equip {}
float m_energy {}
float m_errAbsEnergy {}
float m_errCollimators {}
float m_errCurrents {}
float m_sycLoss {}
float m_errSycLoss {}
bool m_initialized
DataObjIDColl m_extendedExtraObjects
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default).
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default).
std::vector< SG::VarHandleKeyArray * > m_vhka
bool m_varHandleArraysDeclared

Detailed Description

Definition at line 17 of file CBNTAA_TBInfo.h.

Member Typedef Documentation

◆ StoreGateSvc_t

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

Definition at line 388 of file AthCommonDataStore.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
protectedinherited
Enumerator
NOT_VALID 

Definition at line 56 of file CBNT_TBRecBase.h.

56{NOT_VALID = -999};

Constructor & Destructor Documentation

◆ CBNTAA_TBInfo()

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

Definition at line 19 of file CBNTAA_TBInfo.cxx.

19 :
20CBNT_TBRecBase(name, pSvcLocator)
21{
22 declareProperty("DBRead", m_DBRead=false);
23 declareProperty("BeamEnergy", m_beamener);
24 declareProperty("BeamType", m_beamtype);
25 declareProperty("ComputeBeamEnergy", m_computeBeamEnergy=false);
26 declareProperty("DumpBeamLine", m_dumpBeamLine=true);
27
28}
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
bool m_computeBeamEnergy
CBNT_TBRecBase(const std::string &name, ISvcLocator *pSvcLocator)

◆ ~CBNTAA_TBInfo()

CBNTAA_TBInfo::~CBNTAA_TBInfo ( )
virtual

Definition at line 30 of file CBNTAA_TBInfo.cxx.

31{
32 delete m_quad_file;
33 delete m_quad_equip;
34 delete m_bend_file;
35 delete m_bend_equip;
36 delete m_trim_file;
37 delete m_trim_equip;
38 delete m_coll_file;
39 delete m_coll_equip;
40}
std::vector< float > * m_quad_file
std::vector< float > * m_quad_equip
std::vector< float > * m_trim_file
std::vector< float > * m_bend_file
std::vector< float > * m_trim_equip
std::vector< float > * m_bend_equip
std::vector< float > * m_coll_equip
std::vector< float > * m_coll_file

Member Function Documentation

◆ addBranch() [1/3]

template<class T>
void CBNT_TBRecBase::addBranch ( const std::string & branchname,
T & obj,
const std::string & leaflist )
inlineprotectedinherited

Definition at line 44 of file CBNT_TBRecBase.h.

44 {
45 m_nt->Branch(branchname.c_str(), &obj, leaflist.c_str());
46 }

◆ addBranch() [2/3]

template<class T>
void CBNT_TBRecBase::addBranch ( const std::string & branchname,
T *& obj )
inlineprotectedinherited

Definition at line 47 of file CBNT_TBRecBase.h.

47 {
48 obj = new T();
49 m_nt->Branch(branchname.c_str(), &obj);
50 }
unsigned long long T

◆ addBranch() [3/3]

template<class T>
void CBNT_TBRecBase::addBranch ( const std::string & branchname,
T *& obj,
int bufferSize,
int splitLevel )
inlineprotectedinherited

Definition at line 51 of file CBNT_TBRecBase.h.

51 {
52 obj = new T();
53 m_nt->Branch(branchname.c_str(), &obj, bufferSize, splitLevel);
54 }

◆ calculateAll()

void CBNTAA_TBInfo::calculateAll ( int runNumber,
int eventNumber )
private

Definition at line 279 of file CBNTAA_TBInfo.cxx.

279 {
280
281 int run = runNumber;
282 int event = eventNumber;
283
284 ATH_MSG_VERBOSE( "run " << run );
285
286 //check if the run is a VLE run then set the flag
287 if (((run < 2101225) && (run >= 2101022)) || ((run < 2102165) && (run >= 2102003)))
288 m_is_VLE=1;
289
290 //starting from event=2 we dont have to recalculate the variables unless the run number changes
291 if (event > 1)
292 {
293 if (run == m_prevrunNum)
294 {
301
302 return;
303 }
304 else
306 }
307
308 m_runEnergy_nt= m_runpar->beam_energy();
309 m_runParticleType_nt = m_runpar->beam_type();
310
311 float bend_equip[9];
312 float coll_equip[24];
313
314 int nc_quad = 22;
315 int nc_bend = 9;
316 int nc_trim = 10;
317 int nc_coll = 24;
318
319 std::string folder;
320 if (m_dumpBeamLine == true)
321 {
322// const GenericDbTable* dcstbl_quad_file[22] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
323// const GenericDbTable* dcstbl_quad_equip[22] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
324// const GenericDbTable* dcstbl_bend_file[9] = {0,0,0,0,0,0,0,0,0};
325// const GenericDbTable* dcstbl_bend_equip[9] = {0,0,0,0,0,0,0,0,0};
326// const GenericDbTable* dcstbl_trim_file[10] = {0,0,0,0,0,0,0,0,0,0};
327// const GenericDbTable* dcstbl_trim_equip[10] = {0,0,0,0,0,0,0,0,0,0};
328// const GenericDbTable* dcstbl_coll_file[24] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
329// const GenericDbTable* dcstbl_coll_equip[24] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
330
331// int ncol_quad_file[22], nrow_quad_file[22];
332// int ncol_bend_file[9], nrow_bend_file[9];
333// int ncol_trim_file[10], nrow_trim_file[10];
334// int ncol_coll_file[24], nrow_coll_file[24];
335// int ncol_quad_equip[22], nrow_quad_equip[22];
336// int ncol_bend_equip[9], nrow_bend_equip[9];
337// int ncol_trim_equip[10], nrow_trim_equip[10];
338// int ncol_coll_equip[24], nrow_coll_equip[24];
339
340// std::vector<std::string> names_quad_file[22], rows_quad_file[22];
341// std::vector<std::string> names_bend_file[9], rows_bend_file[9];
342// std::vector<std::string> names_trim_file[10], rows_trim_file[10];
343// std::vector<std::string> names_coll_file[24], rows_coll_file[24];
344// std::vector<std::string> names_quad_equip[22], rows_quad_equip[22];
345// std::vector<std::string> names_bend_equip[9], rows_bend_equip[9];
346// std::vector<std::string> names_trim_equip[10], rows_trim_equip[10];
347// std::vector<std::string> names_coll_equip[24], rows_coll_equip[24];
348
349 float quad_file[22];
350 float bend_file[9];
351 float trim_file[10];
352 float coll_file[24];
353 float quad_equip[22];
354 float trim_equip[10];
355
356 m_quad_file->reserve(nc_quad);
357 m_quad_equip->reserve(nc_quad);
358 for (int i=0; i<nc_quad; i++)
359 {
360 quad_file[i] = -1;
361 quad_equip[i] = -1;
362 unsigned int val1;
363 unsigned int val2;
364
365#if 0
366 if (run < 1000454)
367 {
368 folder = "/TILE/DCS/SYSTEM1/BEAM";
369 }
370 else
371#endif
372 {
373 folder = "/TILE/DCS/SYSTEM1/BEAM";
374 }
375 val1 = i+6;
376 val2 = i+48;
377
378 if (StatusCode::SUCCESS!=m_runpar->getVal(folder,val1,quad_file[i])) {
379 ATH_MSG_ERROR( "Cannot find val" << val1 );
380 }
381 if (StatusCode::SUCCESS!=m_runpar->getVal(folder,val2,quad_equip[i])){
382 ATH_MSG_ERROR( "Cannot find val" << val2 );
383 }
384
385 (*m_quad_file)[i] = quad_file[i];
386 (*m_quad_equip)[i] = quad_equip[i];
387 }
388
389
390 m_bend_file->reserve(nc_bend);
391 m_bend_equip->reserve(nc_bend);
392 for (int i=0; i<nc_bend; i++)
393 {
394 bend_file[i] = -1;
395 bend_equip[i] = -1;
396 unsigned int val1;
397 unsigned int val2;
398
399 if (run < 1000454)
400 {
401 folder = "/TILE/DCS/SYSTEM1/BEAM";
402 }
403 else
404 {
405 folder = "/TILE/DCS/TILE_LV_62/BEAM";
406 }
407 val1 = i+28;
408 val2 = i+70;
409
410 if (StatusCode::SUCCESS!=m_runpar->getVal(folder,val1,bend_file[i])) {
411 ATH_MSG_ERROR( "Cannot find val" << val1 );
412 }
413 if (StatusCode::SUCCESS!=m_runpar->getVal(folder,val2,bend_equip[i])) {
414 ATH_MSG_ERROR( "Cannot find val" << val2 );
415 }
416
417 (*m_bend_file)[i] = bend_file[i];
418 (*m_bend_equip)[i] = bend_equip[i];
419
420 //added on 12.03.2006 by H.Hakobyan for caching purposes
421 if (!m_is_VLE)
422 {
423 //if the currents B3 and B4 are the same as in previous event then quit..
424 if((m_prevB3 == bend_equip[2]) && (m_prevB4 == bend_equip[3]))
425 return;
426 }
427 else
428 {
429 //if the current B8 is the same as in previous event then quit..
430 if(m_prevB8 == bend_equip[7])
431 return;
432 }
433
434 }
435
436 m_trim_file->reserve(nc_trim);
437 m_trim_equip->reserve(nc_trim);
438 for (int i=0; i<nc_trim; i++)
439 {
440 trim_file[i] = -1;
441 trim_equip[i] = -1;
442 unsigned int val1;
443 unsigned int val2;
444
445 if (run < 1000454)
446 {
447 folder = "/TILE/DCS/SYSTEM1/BEAM";
448 }
449 else
450 {
451 folder = "/TILE/DCS/TILE_LV_62/BEAM";
452 }
453 val1 = i+37;
454 val2 = i+79;
455
456 if (StatusCode::SUCCESS!=m_runpar->getVal(folder,val1,trim_file[i])) {
457 ATH_MSG_ERROR( "Cannot find val" << val1 );
458 }
459 if (StatusCode::SUCCESS!=m_runpar->getVal(folder,val2,trim_equip[i])) {
460 ATH_MSG_ERROR( "Cannot find val" << val2 );
461 }
462
463 (*m_trim_file)[i] = trim_file[i];
464 (*m_trim_equip)[i] = trim_equip[i];
465 }
466
467
468 m_coll_file->reserve(nc_coll);
469 m_coll_equip->reserve(nc_coll);
470 for (int i=0; i<nc_coll; i++)
471 {
472 coll_file[i] = -1;
473 coll_equip[i] = -1;
474 unsigned int val1;
475 unsigned int val2;
476
477
478 if (run < 1000454)
479 {
480 folder = "/TILE/DCS/SYSTEM1/BEAM";
481 }
482 else
483 {
484 folder = "/TILE/DCS/TILE_LV_62/BEAM";
485 }
486 val1 = i+90;
487 val2 = i+115;
488
489 if (StatusCode::SUCCESS!=m_runpar->getVal(folder,val1,coll_file[i])) {
490 ATH_MSG_ERROR( "Cannot find val" << val1 );
491 }
492 if (StatusCode::SUCCESS!=m_runpar->getVal(folder,val2,coll_equip[i])) {
493 ATH_MSG_ERROR( "Cannot find val" << val2 );
494 }
495
496 (*m_coll_file)[i] = coll_file[i];
497 (*m_coll_equip)[i] = coll_equip[i];
498 }
499
500
501 for (int i=0; i<nc_quad; i++)
502 {
503 ATH_MSG_DEBUG( "Q" << i+1 << " from file " << (*m_quad_file)[i] );
504 }
505 for (int i=0; i<nc_bend; i++)
506 {
507 ATH_MSG_DEBUG( "B" << i+1 << " from file " << (*m_bend_file)[i] );
508 }
509 for (int i=0; i<nc_trim; i++)
510 {
511 ATH_MSG_DEBUG( "Trim" << i+1 << " from file " << (*m_trim_file)[i] );
512 }
513 for (int i=0; i<nc_coll; i++)
514 {
515 int j = i/2;
516 if (i == 2*j)
517 {
518 ATH_MSG_DEBUG( "Coll" << j+1 << " from file (up or right position) " << (*m_coll_file)[i] );
519 ATH_MSG_DEBUG( "Coll" << j+1 << " from file (down or left position) " << (*m_coll_file)[i+1] );
520 }
521 }
522
523
524 for (int i=0; i<nc_quad; i++)
525 {
526 ATH_MSG_DEBUG( "Q" << i+1 << " from equipement " << (*m_quad_equip)[i] );
527 }
528 for (int i=0; i<nc_bend; i++)
529 {
530 ATH_MSG_DEBUG( "B" << i+1 << " from equipement " << (*m_bend_equip)[i] );
531 }
532 for (int i=0; i<nc_trim; i++)
533 {
534 ATH_MSG_DEBUG( "Trim" << i+1 << " from equipement " << (*m_trim_equip)[i] );
535 }
536 for (int i=0; i<nc_coll; i++)
537 {
538 int j = i/2;
539 if (i == 2*j)
540 {
541 ATH_MSG_DEBUG( "Coll" << j+1 << " from equipement (up or right position) " << (*m_coll_equip)[i] );
542 ATH_MSG_DEBUG( "Coll" << j+1 << " from file (down or left position) " << (*m_coll_equip)[i+1] );
543 }
544 }//for
545 }//end of if (m_dumpBeamLine = true)
546 else // if(m_dumpBeamLine == false)
547 {
548// const GenericDbTable* dcstbl_bend_equip[9] = {0,0,0,0,0,0,0,0,0};
549// const GenericDbTable* dcstbl_coll_equip[24] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
550// int ncol_bend_equip[9], nrow_bend_equip[9];
551// int ncol_coll_equip[9], nrow_coll_equip[9];
552// std::vector<std::string> names_bend_equip[9], rows_bend_equip[9];
553// std::vector<std::string> names_coll_equip[9], rows_coll_equip[9];
554
555 for (int i=0; i<nc_bend; i++)
556 {
557 bend_equip[i] = -1;
558 unsigned int val2;
559
560 if (run < 1000454)
561 {
562 folder = "/TILE/DCS/SYSTEM1/BEAM";
563 }
564 else
565 {
566 folder = "/TILE/DCS/TILE_LV_62/BEAM";
567 }
568 val2 = i+70;
569 if (StatusCode::SUCCESS!=m_runpar->getVal(folder,val2,bend_equip[i])) {
570 ATH_MSG_ERROR( "Cannot find val" << val2 );
571 }
572 }
573
574
575 for (int i=0; i<nc_coll; i++)
576 {
577 coll_equip[i] = -1;
578 unsigned int val2;
579
580 if (run < 1000454)
581 {
582 folder = "/TILE/DCS/SYSTEM1/BEAM";
583 }
584 else
585 {
586 folder = "/TILE/DCS/TILE_LV_62/BEAM";
587 }
588 val2 = i+115;
589 if (StatusCode::SUCCESS!=m_runpar->getVal(folder,val2,coll_equip[i])) {
590 ATH_MSG_ERROR( "Cannot find val" << val2 );
591 }
592 }
593
594 }//end of if(m_dumpBeamLine = false)
595
596 //check if the run is a VLE run then set the flag
597 //if (((run < 2101225) && (run >= 2101022)) || ((run < 2102165) && (run >= 2102003)))
598 // m_is_VLE=1;
599
600 // --- modifying the code introducing two cases - for VLE and HLE, with different beam energy calculations ---
601 if(m_is_VLE)//run is a VLE run
602 {
603
604 //ATH_MSG_INFO( "THIS is a VLE run..." );
605 //ATH_MSG_INFO( "B8 current=" << bend_equip[7] );
606
607 //a polynomial function giving the values of Bdl for any given B8 current value...MIGRAD method for 4th order polynome ...:)
608 // m_B8_Bdl = 0.00525593*bend_equip[7] + 0.00000410442*bend_equip[7]*bend_equip[7] -
609 // 0.00000000906592*bend_equip[7]*bend_equip[7]*bend_equip[7]+
610 // 0.00000000000345019*bend_equip[7]*bend_equip[7]*bend_equip[7]*bend_equip[7];
611
612 //a polynomial function giving the values of Bdl for any given B8 current value...MINOS method ...for 5th order polynome:)
613 m_B8_Bdl = 0.00530982*bend_equip[7] + 0.00000328502*bend_equip[7]*bend_equip[7] -
614 0.00000000532397*bend_equip[7]*bend_equip[7]*bend_equip[7]-
615 0.00000000000276483*bend_equip[7]*bend_equip[7]*bend_equip[7]*bend_equip[7]+
616 0.000000000000003368*bend_equip[7]*bend_equip[7]*bend_equip[7]*bend_equip[7]*bend_equip[7];
617
618 //beam energy calculation basedon a famous formula..
619 m_energy = 2.49826 * m_B8_Bdl;
621
622 ATH_MSG_DEBUG( "B8dl=" << m_B8_Bdl );
623 ATH_MSG_DEBUG( "m_energy=" << m_energy );
624
625 //C12 opening calculations... C12 is the onlycollimator which is responsible for VLE runs
626 float coll12_opening = (fabs(coll_equip[11]) + fabs(coll_equip[23]))/2.0;
627 m_errCollimators = sqrt(coll12_opening*coll12_opening)*(1./27);
628
629 //calculation of errors of magnet currents..
630 m_errCurrents = GetErrCurr(bend_equip[6], bend_equip[7]);
631 m_sycLoss = SyncLoss(m_energy, bend_equip[6], bend_equip[7]);
633
634 //for caching purposes
635 m_prevB8 = bend_equip[7];
636 }
637 else//run is a HLE run
638 {
639 m_energy = GetEnergy(bend_equip[2], bend_equip[3]);
641 m_errCollimators = GetErrColl(coll_equip[4], coll_equip[5], coll_equip[16], coll_equip[17]);
642 m_errCurrents = GetErrCurr(bend_equip[2], bend_equip[3]);
643 m_sycLoss = SyncLoss(m_energy, bend_equip[2], bend_equip[3]);
645
646 //for caching purposes
647 m_prevB3 = bend_equip[2];
648 m_prevB4 = bend_equip[3];
649 }
650
651 //assigning the previous vars for caching..
658
659
660}
#define ATH_MSG_ERROR(x)
#define ATH_MSG_VERBOSE(x)
#define ATH_MSG_DEBUG(x)
int GetEnergy()
Definition GetEnergy.cxx:81
float m_preverrSycLoss
long m_runParticleType_nt
ToolHandle< TBCondRunParTool > m_runpar
float SyncLoss(float energy, float currB3, float currB4)
float SyncLossErr(float loss)
float m_preverrCurrents
float m_errCollimators
float GetErrAbsE(float energy)
float GetErrCurr(float currB3, float currB4)
float m_preverrAbsEnergy
float m_preverrCollimators
float GetErrColl(float coll3_down, float coll3_up, float coll9_down, float coll9_up)
float j(const xAOD::IParticle &, const xAOD::TrackMeasurementValidation &hit, const Eigen::Matrix3d &jab_inv)
int run(int argc, char *argv[])

◆ CBNT_clear()

StatusCode CBNTAA_TBInfo::CBNT_clear ( )
overrideprivatevirtual

Reimplemented from CBNT_TBRecBase.

Definition at line 264 of file CBNTAA_TBInfo.cxx.

265{
266 if(m_quad_file) m_quad_file->clear();
267 if(m_quad_equip) m_quad_equip->clear();
268 if(m_bend_file) m_bend_file->clear();
269 if(m_bend_equip) m_bend_equip->clear();
270 if(m_trim_file) m_trim_file->clear();
271 if(m_trim_equip) m_trim_equip->clear();
272 if(m_coll_file) m_coll_file->clear();
273 if(m_coll_equip) m_coll_equip->clear();
274
275
276 return StatusCode::SUCCESS;
277}

◆ CBNT_execute()

StatusCode CBNTAA_TBInfo::CBNT_execute ( )
overridevirtual

Reimplemented from CBNT_TBRecBase.

Definition at line 96 of file CBNTAA_TBInfo.cxx.

96 {
97
98 const EventContext& ctx = Gaudi::Hive::currentContext();
99
102
103 if ( m_DBRead ) {
104
105 int run = ctx.eventID().run_number();
106 uint64_t event = ctx.eventID().event_number();
107
108 ATH_MSG_VERBOSE( "run " << run );
109
110 if((event > 0) && (m_prevrunNum==-1))
111 m_prevrunNum=run;//initializing the prev run
112
113 // This tool handles the conversion between local and ctb coordinates
114 ATH_CHECK( m_coord.retrieve() );
115 m_runEta_nt = m_coord->beam_local_eta();
116
117 ATH_CHECK( m_runpar.retrieve() );
118
119 if ( m_computeBeamEnergy ) {
120
121 //below the calculation of all energies and their errors...
122 calculateAll(run,event);
123
124 ATH_MSG_DEBUG( "m_energy " << m_energy );
125 ATH_MSG_DEBUG( "m_errAbsEnergy " << m_errAbsEnergy );
126 ATH_MSG_DEBUG( "m_errCollimators " << m_errCollimators );
127 ATH_MSG_DEBUG( "m_errCurrents " << m_errCurrents );
128 ATH_MSG_DEBUG( "m_sycLoss " << m_sycLoss );
129 ATH_MSG_DEBUG( "m_errSycLoss " << m_errSycLoss );
130
131 }
132
133 }//end of if (m_DBRead)
134
135 return StatusCode::SUCCESS;
136}
#define ATH_CHECK
Evaluate an expression and check for errors.
ToolHandle< ICaloCoordinateTool > m_coord
void calculateAll(int runNumber, int eventNumber)

◆ CBNT_finalize()

StatusCode CBNTAA_TBInfo::CBNT_finalize ( )
overridevirtual

Reimplemented from CBNT_TBRecBase.

Definition at line 257 of file CBNTAA_TBInfo.cxx.

257 {
258
259 return StatusCode::SUCCESS;
260}

◆ CBNT_initialize()

StatusCode CBNTAA_TBInfo::CBNT_initialize ( )
overridevirtual

Reimplemented from CBNT_TBRecBase.

Definition at line 42 of file CBNTAA_TBInfo.cxx.

42 {
43
45
46 addBranch("EVENT_RunEta", m_runEta_nt,"RunEta/D");
47 addBranch("EVENT_RunPartType", m_runParticleType_nt,"RunPartType/l");
48 addBranch("EVENT_RunEnergy", m_runEnergy_nt,"RunEnergy/l");
49 addBranch("EVENT_Energy", m_energy,"Energy/f");
50
51 if ( m_computeBeamEnergy ) {
52
53 addBranch("EVENT_ErrAbsEnergy", m_errAbsEnergy,"ErrAbsEnergy/f");
54 addBranch("EVENT_ErrCollimators", m_errCollimators,"ErrCollimators/f");
55 addBranch("EVENT_ErrCurrents", m_errCurrents,"ErrCurrents/f");
56 addBranch("EVENT_SyncLoss", m_sycLoss,"SyncLoss/f");
57 addBranch("EVENT_ErrSyncLoss", m_errSycLoss,"ErrSyncLoss/f");
58
59 if ( m_dumpBeamLine ) {
60
61 addBranch("EVENT_Quad_file", m_quad_file);
62 addBranch("EVENT_Quad_equip", m_quad_equip);
63
64 addBranch("EVENT_Bend_file", m_bend_file);
65 addBranch("EVENT_Bend_equip", m_bend_equip);
66
67 addBranch("EVENT_Trim_file", m_trim_file);
68 addBranch("EVENT_Trim_equip", m_trim_equip);
69
70 addBranch("EVENT_Coll_file", m_coll_file);
71 addBranch("EVENT_Coll_equip", m_coll_equip);
72 }
73
74 }
75
76 //VLE flag set to false
77 m_is_VLE=0;
78 //Bdl value of B8 magnet is also set to 0 - the case for HLE runs..
79 m_B8_Bdl=0.0;
80 //set a previous vars to -1
81 m_prevrunNum = -1;
82 m_prevEnergy = -1.0;
83 m_preverrAbsEnergy = -1.0;
85 m_preverrCurrents = -1.0;
86 m_prevsycLoss = -1.0;
87 m_preverrSycLoss = -1.0;
88 m_prevB3 = -1.0;
89 m_prevB4 = -1.0;
90 m_prevB8 = -1.0;
91
92 return StatusCode::SUCCESS;
93}
static Double_t sc
void addBranch(const std::string &branchname, T &obj, const std::string &leaflist)
::StatusCode StatusCode
StatusCode definition for legacy code.

◆ declareGaudiProperty()

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

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

Definition at line 156 of file AthCommonDataStore.h.

158 {
160 hndl.value(),
161 hndl.documentation());
162
163 }

◆ declareProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty ( Gaudi::Property< T, V, H > & t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145 {
146 typedef typename SG::HandleClassifier<T>::type htype;
148 }
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>

◆ 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.

◆ evtStore()

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.

◆ execute()

StatusCode CBNT_TBRecBase::execute ( )
overridevirtualinherited

Definition at line 154 of file CBNT_TBRecBase.cxx.

154 {
155
157
158 // run pre-execution
159 try {
160 sc = this->pre_execute();
161 }
162
163 catch( const std::exception& Exception ) {
164 *m_log << MSG::ERROR << " Standard exception "
165 << Exception.what()
166 << " caught from sub-algorithm::CBNT_pre_execute (). Disable !" << endmsg ;
167 sc = this->setProperty(BooleanProperty( "Enable",false ) );
168 return StatusCode::FAILURE;
169
170 }
171 catch (...) {
172 *m_log << MSG::ERROR << " Unknown exception "
173 << " caught from sub-algorithm::CBNT_pre_execute (). Disable !" << endmsg ;
174 sc = this->setProperty(BooleanProperty( "Enable",false ) );
175 return StatusCode::FAILURE;
176 }
177
178 if (sc.isFailure()) {
179 *m_log << MSG::ERROR << "CBNT_pre_execute() failed. Disable !" << endmsg;
180 sc = this->setProperty(BooleanProperty( "Enable",false ) );
181 return sc;
182 }
183
184 // now subalgorithm execution
185 try {
186 sc = this->CBNT_execute();
187 }
188
189 catch( const std::exception& Exception ) {
190 *m_log << MSG::ERROR << " Standard exception "
191 << Exception.what()
192 << " caught from sub-algorithm::CBNT_execute () :" << endmsg ;
193 return StatusCode::FAILURE;
194 }
195 catch (...) {
196 *m_log << MSG::ERROR << " Unknown exception "
197 << " caught from sub-algorithm::CBNT_execute () :" << endmsg ;
198 return StatusCode::FAILURE;
199 }
200
201 return sc;
202}
#define endmsg
void setProperty(columnar::PythonToolHandle &self, const std::string &key, nb::object value)
virtual StatusCode CBNT_execute()
MsgStream * m_log
virtual StatusCode pre_execute()

◆ 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}
DataObjIDColl m_extendedExtraObjects

◆ finalize()

StatusCode CBNT_TBRecBase::finalize ( )
overridevirtualinherited

Definition at line 205 of file CBNT_TBRecBase.cxx.

205 {
206
208
209 //now subalgorithm finalisation
210 try {
211 sc = this->CBNT_finalize();
212 }
213 catch( const std::exception& Exception ) {
214 *m_log << MSG::ERROR << " Standard exception "
215 << Exception.what()
216 << " caught from sub-algorithm::CBNT_finalize () :" << endmsg ;
217 }
218 catch (...) {
219 *m_log << MSG::ERROR << " Unknown exception "
220 << " caught from sub-algorithm::CBNT_finalize () :" << endmsg ;
221 }
222
223 return sc;
224}
virtual StatusCode CBNT_finalize()

◆ GetBdl3()

float CBNTAA_TBInfo::GetBdl3 ( float current)
private

Definition at line 152 of file CBNTAA_TBInfo.cxx.

153{
154 float Bend3_low[2] = {0.0079347, 0.021813};
155 float Bend3_high[4] = {0.437329, 0.0212849, 0.00000355516, -0.0000000147542};
156
157 float Bdl3 = 0;
158
159 current = fabs(current);
160
161 if (current <= 824.12) Bdl3 = Bend3_low[0] + Bend3_low[1]*current;
162 else Bdl3 = Bend3_high[0] + Bend3_high[1]*current + Bend3_high[2]*(current-824.12)*(current-824.12) + Bend3_high[3]*(current-824.12)*(current-824.12)*(current-824.12);
163
164 return Bdl3;
165}

◆ GetBdl4()

float CBNTAA_TBInfo::GetBdl4 ( float current)
private

Definition at line 168 of file CBNTAA_TBInfo.cxx.

169{
170 float Bend4_low[2] = {0.00786406, 0.021814};
171 float Bend4_high[4] = {0.434258, 0.0212899, 0.00000356113, -0.0000000147379};
172
173 float Bdl4 = 0;
174
175 current = fabs(current);
176
177 if (current <= 824.12) Bdl4 = Bend4_low[0] + Bend4_low[1]*current;
178 else Bdl4 = Bend4_high[0] + Bend4_high[1]*current + Bend4_high[2]*(current-824.12)*(current-824.12) + Bend4_high[3]*(current-824.12)*(current-824.12)*(current-824.12);
179
180 return Bdl4;
181}

◆ GetEnergy()

float CBNTAA_TBInfo::GetEnergy ( float CurrB3,
float CurrB4 )
private

Definition at line 141 of file CBNTAA_TBInfo.cxx.

142{
143 float Bdltot = GetBdl3(currB3) + GetBdl4(currB4);
144
145 float energy = (0.3/41.)*Bdltot * 1000;
146
147 return energy;
148}
float GetBdl3(float current)
float GetBdl4(float current)

◆ GetErrAbsE()

float CBNTAA_TBInfo::GetErrAbsE ( float energy)
private

Definition at line 194 of file CBNTAA_TBInfo.cxx.

195{
196 float fac = 25./energy;
197 float err_abs = sqrt(fac*fac + 0.5*0.5);
198
199 return err_abs;
200}

◆ GetErrColl()

float CBNTAA_TBInfo::GetErrColl ( float coll3_down,
float coll3_up,
float coll9_down,
float coll9_up )
private

Definition at line 184 of file CBNTAA_TBInfo.cxx.

185{
186 float coll3_opening = (fabs(coll3_down) + fabs(coll3_up))/2.0;
187 float coll9_opening = (fabs(coll9_down) + fabs(coll9_up))/2.0;
188
189 float errcoll = sqrt(coll3_opening*coll3_opening + coll9_opening*coll9_opening)*(1./27);
190
191 return errcoll;
192}

◆ GetErrCurr()

float CBNTAA_TBInfo::GetErrCurr ( float currB3,
float currB4 )
private

Definition at line 203 of file CBNTAA_TBInfo.cxx.

204{
205 float Bdl3 = GetBdl3(currB3);
206 float Bdl4 = GetBdl4(currB4);
207
208 float Bdl_tot = Bdl3 + Bdl4;
209
210 float errBdl3 = (GetBdl3(currB3 + 0.1) - GetBdl3(currB3 - 0.1))/2;
211 float errBdl4 = (GetBdl4(currB4 + 0.1) - GetBdl4(currB4 - 0.1))/2;
212 const float fac3 = errBdl3/Bdl3;
213 const float fac4 = errBdl4/Bdl4;
214 float errBdl = sqrt(fac3*fac3 + fac4*fac4)*Bdl_tot;
215
216 float resField = sqrt(0.0010*0.0010 + 0.0010*0.0010);
217
218 errBdl = sqrt(errBdl*errBdl + resField*resField + Bdl_tot*0.0003 * Bdl_tot*0.0003)/Bdl_tot*100;
219
220 return errBdl;
221}

◆ initialize()

StatusCode CBNT_TBRecBase::initialize ( )
overridevirtualinherited

Definition at line 22 of file CBNT_TBRecBase.cxx.

22 {
23 m_log=new MsgStream(msgSvc(), name());
24
25 *m_log << MSG::DEBUG << "Initializing CBNT_TBRecBase base class" << endmsg;
26
27 const CaloCell_ID* idHelper = nullptr;
28 ATH_CHECK( detStore()->retrieve (idHelper, "CaloCell_ID") );
29 m_emId=idHelper->em_idHelper();
30 m_fcalId=idHelper->fcal_idHelper();
31 m_hecId=idHelper->hec_idHelper();
32
33
34 if (!m_emId) {
35 (*m_log) << MSG::ERROR << "Could not access lar EM ID helper" << endmsg;
36 return StatusCode::FAILURE;
37 }
38 if (!m_fcalId) {
39 (*m_log) << MSG::ERROR << "Could not access lar FCAL ID helper" << endmsg;
40 return StatusCode::FAILURE;
41 }
42 if (!m_hecId) {
43 (*m_log) << MSG::ERROR << "Could not access lar HEC ID helper" << endmsg;
44 return StatusCode::FAILURE;
45 }
46
47 StatusCode sc = detStore()->retrieve(m_onlineId, "LArOnlineID");
48 if (sc.isFailure()) {
49 (*m_log) << MSG::ERROR << "Could not get LArOnlineID helper !" << endmsg;
50 return StatusCode::FAILURE;
51 }
52 else {
53 (*m_log) << MSG::DEBUG << " Found the LArOnlineID helper. " << endmsg;
54 }
55
56
57 m_initialized=true;
58 return StatusCode::SUCCESS;
59}
const ServiceHandle< StoreGateSvc > & detStore() const
const LArOnlineID * m_onlineId
const LArFCAL_ID * m_fcalId
const LArEM_ID * m_emId
const LArHEC_ID * m_hecId
const LArFCAL_ID * fcal_idHelper() const
access to FCAL idHelper
Definition CaloCell_ID.h:75
const LArEM_ID * em_idHelper() const
access to EM idHelper
Definition CaloCell_ID.h:63
const LArHEC_ID * hec_idHelper() const
access to HEC idHelper
Definition CaloCell_ID.h:69

◆ 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()

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

Definition at line 24 of file AthCommonMsg.h.

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

◆ 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.

◆ pre_execute()

StatusCode CBNT_TBRecBase::pre_execute ( )
virtualinherited

Definition at line 61 of file CBNT_TBRecBase.cxx.

61 {
62
64
65 if(!m_initialized) {
66
67 if (m_ntpath.size()==0 || m_ntTitle.size()==0) {
68 *m_log << MSG::ERROR << "Need to set variable 'm_ntpath' and 'm_ntTitle' in constructor of deriving class!" << endmsg;
69 return StatusCode::FAILURE;
70 }
71
72 size_t i=m_ntpath.rfind('/');
73 if (i==std::string::npos) {
74 *m_log << MSG::ERROR << "Expected at least on '/' in path " << m_ntpath << endmsg;
75 return StatusCode::FAILURE;
76 }
77 std::string basepath(m_ntpath.begin(),m_ntpath.begin()+i);
78 //std::cout << "Basepath" << basepath << std::endl;
79
80 // retrieve pointer to THistSvc
81 ServiceHandle<ITHistSvc> tHistSvc("THistSvc", name());
82 ATH_CHECK( tHistSvc.retrieve() );
83
84 // get TTree
85 sc = tHistSvc->getTree(m_ntpath,m_nt);
86 if (sc.isFailure()) {
87 *m_log << MSG::ERROR << "Unable to retrieve TTree : " << m_ntpath << endmsg;
88 return sc;
89 }
90 /*
91 NTupleFilePtr file1(ntupleSvc(),basepath);
92 if (!file1){
93 (*m_log) << MSG::ERROR << "Could not get NTupleFilePtr with path " << basepath << " failed" << endmsg;
94 return StatusCode::FAILURE;
95 }
96 NTuplePtr nt(ntupleSvc(),m_ntpath);
97 if (!nt) {
98 nt=ntupleSvc()->book(m_ntpath,CLID_ColumnWiseTuple,m_ntTitle);
99 }
100 if (!nt){
101 (*m_log) << MSG::ERROR << "Booking of NTuple at "<< m_ntpath << " and name " << m_ntTitle << " failed" << endmsg;
102 return StatusCode::FAILURE;
103 }
104 m_nt=nt;
105 */
106 //std::cout << "Ntuple ptr:" << m_nt << std::endl;
107
108 // subalgorithm initialisation
109 try {
110 sc = this->CBNT_initialize();
111 }
112 catch( const std::exception& Exception ) {
113 *m_log << MSG::ERROR << " Standard exception "
114 << Exception.what()
115 << " caught from sub-algorithm::CBNT_initialize () :" << endmsg ;
116 }
117 catch (...) {
118 *m_log << MSG::ERROR << " Unknown exception "
119 << " caught from sub-algorithm::CBNT_initialize () :" << endmsg ;
120 }
121
122 if (sc.isFailure())
123 {
124 *m_log << MSG::ERROR << "CBNT_initialize() failed" << endmsg;
125 return sc;
126 }
127
128 m_initialized=true;
129 }
130
131 // clear data members
132 try {
133 sc = this->CBNT_clear();
134 }
135 catch( const std::exception& Exception ) {
136 *m_log << MSG::ERROR << " Standard exception "
137 << Exception.what()
138 << " caught from sub-algorithm::CBNT_clear () :" << endmsg ;
139 }
140 catch (...) {
141 *m_log << MSG::ERROR << " Unknown exception "
142 << " caught from sub-algorithm::CBNT_clear () :" << endmsg ;
143 }
144
145 if (sc.isFailure()) {
146 *m_log << MSG::ERROR << "CBNT_clear() failed" << endmsg;
147 return sc;
148 }
149
150 return StatusCode::SUCCESS ;
151}
std::string m_ntTitle
virtual StatusCode CBNT_clear()
std::string m_ntpath
virtual StatusCode CBNT_initialize()

◆ 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();
384 }
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)

◆ 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 {
366 }

◆ SyncLoss()

float CBNTAA_TBInfo::SyncLoss ( float energy,
float currB3,
float currB4 )
private

Definition at line 225 of file CBNTAA_TBInfo.cxx.

226{
227 float Lmag = 5.127;
228
229 float Bdl_B3 = GetBdl3(currB3);
230 float Bdl_B4 = GetBdl4(currB4);
231
232 float B2dl_B3 = (Bdl_B3 * Bdl_B3)*(1./(Lmag*9));
233 float B2dl_B4 = (Bdl_B4 * Bdl_B4)*(1./(Lmag*9));
234 float B2dl_tot = B2dl_B3 + B2dl_B4;
235
236 float B5suB34 = 0.19;
237 float B6suB34 = 0.22;
238 float B56lB34 = 0.25;
239
240 float B2dl_B5 = (B2dl_B3 + B2dl_B4)*B5suB34*B5suB34*B56lB34;
241 float B2dl_B6 = (B2dl_B3 + B2dl_B4)*B6suB34*B6suB34*B56lB34;
242
243 float loss = 0.00000127*energy*energy*(3*B2dl_tot/2 + B2dl_B5 + B2dl_B6);
244 return loss;
245}

◆ SyncLossErr()

float CBNTAA_TBInfo::SyncLossErr ( float loss)
private

Definition at line 249 of file CBNTAA_TBInfo.cxx.

250{
251 float errloss = loss * 0.02;
252 return errloss;
253}

◆ 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, AthHistogramAlgorithm, and PyAthena::Alg.

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}
#define ATH_MSG_WARNING(x)
virtual StatusCode sysInitialize() override
Override sysInitialize.
AthCommonDataStore(const std::string &name, T... args)
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override

◆ 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) {
313 for (auto k : keys) {
314 k->setOwner(this);
315 }
316 }
317 }
std::vector< SG::VarHandleKeyArray * > m_vhka

Member Data Documentation

◆ m_B8_Bdl

float CBNTAA_TBInfo::m_B8_Bdl {}
private

Definition at line 45 of file CBNTAA_TBInfo.h.

45{}; //B8dl of VLE setup B8 magnet

◆ m_beamener

int CBNTAA_TBInfo::m_beamener {}
private

Definition at line 39 of file CBNTAA_TBInfo.h.

39{};

◆ m_beamtype

int CBNTAA_TBInfo::m_beamtype {}
private

Definition at line 40 of file CBNTAA_TBInfo.h.

40{};

◆ m_bend_equip

std::vector<float>* CBNTAA_TBInfo::m_bend_equip {}
private

Definition at line 72 of file CBNTAA_TBInfo.h.

72{};

◆ m_bend_file

std::vector<float>* CBNTAA_TBInfo::m_bend_file {}
private

Definition at line 71 of file CBNTAA_TBInfo.h.

71{};

◆ m_coll_equip

std::vector<float>* CBNTAA_TBInfo::m_coll_equip {}
private

Definition at line 78 of file CBNTAA_TBInfo.h.

78{};

◆ m_coll_file

std::vector<float>* CBNTAA_TBInfo::m_coll_file {}
private

Definition at line 77 of file CBNTAA_TBInfo.h.

77{};

◆ m_computeBeamEnergy

bool CBNTAA_TBInfo::m_computeBeamEnergy {}
private

Definition at line 41 of file CBNTAA_TBInfo.h.

41{};

◆ m_coord

ToolHandle<ICaloCoordinateTool> CBNTAA_TBInfo::m_coord {this, "CaloCoordinateTool", "TBCaloCoordinate"}
private

Definition at line 36 of file CBNTAA_TBInfo.h.

36{this, "CaloCoordinateTool", "TBCaloCoordinate"};

◆ m_DBRead

bool CBNTAA_TBInfo::m_DBRead {}
private

Definition at line 38 of file CBNTAA_TBInfo.h.

38{};

◆ 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_dumpBeamLine

bool CBNTAA_TBInfo::m_dumpBeamLine {}
private

Definition at line 42 of file CBNTAA_TBInfo.h.

42{};

◆ m_emId

const LArEM_ID* CBNT_TBRecBase::m_emId
protectedinherited

Definition at line 65 of file CBNT_TBRecBase.h.

◆ m_energy

float CBNTAA_TBInfo::m_energy {}
private

Definition at line 80 of file CBNTAA_TBInfo.h.

80{};

◆ m_errAbsEnergy

float CBNTAA_TBInfo::m_errAbsEnergy {}
private

Definition at line 81 of file CBNTAA_TBInfo.h.

81{};

◆ m_errCollimators

float CBNTAA_TBInfo::m_errCollimators {}
private

Definition at line 82 of file CBNTAA_TBInfo.h.

82{};

◆ m_errCurrents

float CBNTAA_TBInfo::m_errCurrents {}
private

Definition at line 83 of file CBNTAA_TBInfo.h.

83{};

◆ m_errSycLoss

float CBNTAA_TBInfo::m_errSycLoss {}
private

Definition at line 85 of file CBNTAA_TBInfo.h.

85{};

◆ 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_fcalId

const LArFCAL_ID* CBNT_TBRecBase::m_fcalId
protectedinherited

Definition at line 67 of file CBNT_TBRecBase.h.

◆ m_hecId

const LArHEC_ID* CBNT_TBRecBase::m_hecId
protectedinherited

Definition at line 66 of file CBNT_TBRecBase.h.

◆ m_initialized

bool CBNT_TBRecBase::m_initialized
privateinherited

Definition at line 40 of file CBNT_TBRecBase.h.

◆ m_is_VLE

bool CBNTAA_TBInfo::m_is_VLE {}
private

Definition at line 46 of file CBNTAA_TBInfo.h.

46{}; //a flag showing whether the run is a VLE run or HLE run

◆ m_log

MsgStream* CBNT_TBRecBase::m_log
protectedinherited

Definition at line 63 of file CBNT_TBRecBase.h.

◆ m_nt

TTree* CBNT_TBRecBase::m_nt
protectedinherited

Definition at line 61 of file CBNT_TBRecBase.h.

◆ m_ntpath

std::string CBNT_TBRecBase::m_ntpath
protectedinherited

Definition at line 58 of file CBNT_TBRecBase.h.

◆ m_ntTitle

std::string CBNT_TBRecBase::m_ntTitle
protectedinherited

Definition at line 58 of file CBNT_TBRecBase.h.

◆ m_onlineId

const LArOnlineID* CBNT_TBRecBase::m_onlineId
protectedinherited

Definition at line 68 of file CBNT_TBRecBase.h.

◆ m_prevB3

float CBNTAA_TBInfo::m_prevB3 {}
private

Definition at line 56 of file CBNTAA_TBInfo.h.

56{};

◆ m_prevB4

float CBNTAA_TBInfo::m_prevB4 {}
private

Definition at line 57 of file CBNTAA_TBInfo.h.

57{};

◆ m_prevB8

float CBNTAA_TBInfo::m_prevB8 {}
private

Definition at line 58 of file CBNTAA_TBInfo.h.

58{};

◆ m_prevEnergy

float CBNTAA_TBInfo::m_prevEnergy {}
private

Definition at line 50 of file CBNTAA_TBInfo.h.

50{};

◆ m_preverrAbsEnergy

float CBNTAA_TBInfo::m_preverrAbsEnergy {}
private

Definition at line 51 of file CBNTAA_TBInfo.h.

51{};

◆ m_preverrCollimators

float CBNTAA_TBInfo::m_preverrCollimators {}
private

Definition at line 52 of file CBNTAA_TBInfo.h.

52{};

◆ m_preverrCurrents

float CBNTAA_TBInfo::m_preverrCurrents {}
private

Definition at line 53 of file CBNTAA_TBInfo.h.

53{};

◆ m_preverrSycLoss

float CBNTAA_TBInfo::m_preverrSycLoss {}
private

Definition at line 55 of file CBNTAA_TBInfo.h.

55{};

◆ m_prevrunNum

int CBNTAA_TBInfo::m_prevrunNum {}
private

Definition at line 49 of file CBNTAA_TBInfo.h.

49{};

◆ m_prevsycLoss

float CBNTAA_TBInfo::m_prevsycLoss {}
private

Definition at line 54 of file CBNTAA_TBInfo.h.

54{};

◆ m_quad_equip

std::vector<float>* CBNTAA_TBInfo::m_quad_equip {}
private

Definition at line 69 of file CBNTAA_TBInfo.h.

69{};

◆ m_quad_file

std::vector<float>* CBNTAA_TBInfo::m_quad_file {}
private

Definition at line 68 of file CBNTAA_TBInfo.h.

68{};

◆ m_runEnergy_nt

long CBNTAA_TBInfo::m_runEnergy_nt {}
private

Definition at line 66 of file CBNTAA_TBInfo.h.

66{};

◆ m_runEta_nt

double CBNTAA_TBInfo::m_runEta_nt {}
private

Definition at line 64 of file CBNTAA_TBInfo.h.

64{};

◆ m_runpar

ToolHandle<TBCondRunParTool> CBNTAA_TBInfo::m_runpar {this, "CondRunParTool", "TBCondRunParTool"}
private

Definition at line 37 of file CBNTAA_TBInfo.h.

37{this, "CondRunParTool", "TBCondRunParTool"};

◆ m_runParticleType_nt

long CBNTAA_TBInfo::m_runParticleType_nt {}
private

Definition at line 65 of file CBNTAA_TBInfo.h.

65{};

◆ m_sycLoss

float CBNTAA_TBInfo::m_sycLoss {}
private

Definition at line 84 of file CBNTAA_TBInfo.h.

84{};

◆ m_trim_equip

std::vector<float>* CBNTAA_TBInfo::m_trim_equip {}
private

Definition at line 75 of file CBNTAA_TBInfo.h.

75{};

◆ m_trim_file

std::vector<float>* CBNTAA_TBInfo::m_trim_file {}
private

Definition at line 74 of file CBNTAA_TBInfo.h.

74{};

◆ 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.


The documentation for this class was generated from the following files: