32 return StatusCode::SUCCESS ;
52 ATH_MSG_WARNING (
" Too many points specified vs the expected content of the ntuple ! " );
60 std::vector<Double_t> Amplitude(2000);
61 std::vector<Double_t> Time(2000);
62 outfit->SetBranchAddress(
"channelId", &channelId);
63 outfit->SetBranchAddress(
"timeIndex", &tIndex);
64 outfit->SetBranchAddress(
"Amplitude", Amplitude.data());
65 outfit->SetBranchAddress(
"Time", Time.data());
68 auto larPhysWaveContainerNew = std::make_unique<LArPhysWaveContainer>();
70 ATH_CHECK ( larPhysWaveContainerNew->initialize() );
73 Long64_t nentries = outfit->GetEntries();
75 for ( Long64_t i = 0; i < nentries; i++ )
81 for (
unsigned int i = 0; i <
m_NPoints; i++ ) wave[i]=0.;
82 unsigned int skipped = 0;
85 double dt=Time[1]-Time[0];
86 for (
unsigned int i = 0; i < limit; i++ )
88 if(i>1 && Time[i] - Time[i-1] != dt) {
90 return StatusCode::FAILURE;
107 return StatusCode::SUCCESS;
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_WARNING(x)
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
const ServiceHandle< StoreGateSvc > & detStore() const
Gaudi::Property< std::string > m_root_file_name
input file name
Gaudi::Property< unsigned int > m_flag
flag for the PhysWave container
Gaudi::Property< unsigned int > m_NPoints
max number of points of the waveform in the ntuple
Gaudi::Property< std::string > m_store_key
key of the PhysWave collection in Storegate
Gaudi::Property< std::string > m_ntuple_name
ntuple name
Gaudi::Property< std::string > m_groupingType
Grouping type. Default is Feedthrough.
Gaudi::Property< int > m_gain
LArPhysWaveFromTuple(const std::string &name, ISvcLocator *pSvcLocator)
Gaudi::Property< unsigned int > m_skipPoints
the first m_skipPoints points of the waveform in the ntuple are skipped
Gaudi::Property< unsigned int > m_prefixPoints
make a PhysWave with the first m_prefixPoints as zeros