/[PAMELA software]/PamCut/CollectionActions/Histo1DActions/LiveTimeRunEventHistoAction/LiveTimeRunEventHistoAction.cpp
ViewVC logotype

Annotation of /PamCut/CollectionActions/Histo1DActions/LiveTimeRunEventHistoAction/LiveTimeRunEventHistoAction.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (hide annotations) (download)
Mon Jan 18 16:13:55 2010 UTC (14 years, 10 months ago) by pam-fi
Branch: MAIN
CVS Tags: Root_V8, MergedToHEAD_1, nuclei_reproc, MergedFromV8_1, BeforeMergingFromV8_1, V9, HEAD
Branch point for: V8
Added to repository.

1 pam-fi 1.1 /*
2     * LiveTimeRunEventHistoAction.cpp
3     *
4     * Created on: 18/jan/2010
5     * Author: Sergio Ricciarini, Nicola Mori
6     */
7    
8     /*! @file LiveTimeRunEventHistoAction.cpp The LiveTimeRunEventHistoAction class implementation file. */
9    
10     #include "LiveTimeRunEventHistoAction.h"
11    
12     LiveTimeRunEventHistoAction::LiveTimeRunEventHistoAction(const char *actionName, TString outFileBase, UInt_t eventID,
13     TString mode) :
14     Histo1DAction<Float_t> (actionName, "Live Time", outFileBase, mode, true), _eventID(eventID) {
15    
16     SetXAxis("LT (s)", 100, 0., 4.5); // Default axis
17     }
18    
19     void LiveTimeRunEventHistoAction::OnGood(PamLevel2 *event) {
20    
21     if (event->GetRunInfo()) {
22    
23     UInt_t eventPN = event->GetRunInfo()->RUNHEADER_PKT + 2 + _eventID; // RUNHEADER_PKT is UInt_t
24    
25     // cout << "expected " << eventPN << "\t";
26    
27     // cout << "actual " << event->GetOrbitalInfo()->pkt_num << endl;
28    
29     if (event->GetOrbitalInfo()->pkt_num == eventPN) {
30     Float_t _LT = 0.16 * (float) (event->GetTrigLevel2()->dltime[0]) / 1000.; // in seconds
31     Fill(_LT);
32    
33     // cout << "ok : " << _LT << endl;
34    
35     }
36    
37     }
38    
39     }
40    
41    

  ViewVC Help
Powered by ViewVC 1.1.23