ATLAS Offline Software
Loading...
Searching...
No Matches
LArFebTimeOffset2Ntuple.cxx File Reference
Include dependency graph for LArFebTimeOffset2Ntuple.cxx:

Go to the source code of this file.

Functions

StatusCode LArFebTimeOffset2Ntuple::stop ATLAS_NOT_THREAD_SAFE ()
 Install fatal handler with default options.

Function Documentation

◆ ATLAS_NOT_THREAD_SAFE()

StatusCode LArFebTimeOffset2Ntuple::stop ATLAS_NOT_THREAD_SAFE ( )
inline

Install fatal handler with default options.

This is meant to be easy to call from python via ctypes.

Definition at line 30 of file LArFebTimeOffset2Ntuple.cxx.

30 {
31
32 //std::cout << detStore()->dump() << std::endl;
33 NTuple::Item<float> offset;
34 NTuple::Item<long> gain;
35
36
37 m_nt->addItem("gain",gain,0,3).ignore();
38 m_nt->addItem("offset",offset,-5000,5000).ignore();
39
40 const LArFEBTimeOffset* feboffsets;
41 //if (detStore()->retrieve(feboffsets,m_inputContainer).isFailure()) {
42 if (detStore()->retrieve(feboffsets).isFailure()) {
43 ATH_MSG_ERROR( "Failed to retrieve LArFEBTimeOffset with key " << m_inputContainer );
44 return StatusCode::FAILURE;
45 }
46
47 const float novalue=-99999;
48 (const_cast<LArFEBTimeOffset*>(feboffsets))->setDefaultReturnValue(novalue);
49
50
51 for (const HWIdentifier fid: m_onlineId->feb_range()) {
52 offset=feboffsets->TimeOffset(fid);
53
54 //FIXME: The PhysWave shifter fills 0 for all not-present FEBs.
55 if (offset!=0 && offset!=novalue) {
56 gain=m_gain;
57 fillFromIdentifier(fid);
58
59 StatusCode sc=ntupleSvc()->writeRecord(m_nt);
60 if (sc!=StatusCode::SUCCESS) {
61 ATH_MSG_ERROR( "writeRecord failed" );
62 return StatusCode::FAILURE;
63 }
64 }//end if have value
65 } // end loop over feb identifiers
66
67 return StatusCode::SUCCESS;
68}
#define ATH_MSG_ERROR(x)
static Double_t sc
INTupleSvc * ntupleSvc()
float TimeOffset(const HWIdentifier fId) const
::StatusCode StatusCode
StatusCode definition for legacy code.