Cat
Run.cpp
Go to the documentation of this file.
1 // $Id: Run.cpp,v 1.5 2006/07/21 09:23:00 fmachefe Exp $
2 #include <iostream>
3 
4 // local
5 #include "TROOT.h"
6 #include "Run.h"
7 
8 //-----------------------------------------------------------------------------
9 // Implementation file for class : Run
10 //
11 // 2004-10-06 : Fr�d�ric Machefert
12 //-----------------------------------------------------------------------------
13 
15 
16 
17 //=============================================================================
18 // Standard constructor, initializes variables
19 //=============================================================================
20  Run::Run( ){
21  m_spySize= 0;
22  m_run = 0;
23  TDatime today;
24  m_date = today.GetDate();
25 
26 }
27 
28 //=============================================================================
29 //
30 //=============================================================================
31  Run::Run( std::vector < short > spyInfo ){
32  setSpy ( spyInfo );
33  m_run = 0;
34  TDatime today;
35  m_date = today.GetDate();
36 }
37 
38 //=============================================================================
39 //
40 //=============================================================================
41  Run::Run( int run , std::vector < short > spyInfo ){
42  setSpy ( spyInfo );
43  m_run = run ;
44  TDatime today;
45  m_date = today.GetDate();
46 }
47 
48 
49 //=============================================================================
50 // Destructor
51 //=============================================================================
53 
54 //=============================================================================
55 //
56 //=============================================================================
57 void Run::setSpy ( std::vector <short> spyInfo ) {
58  m_spyRaw = spyInfo ;
59  m_spySize= m_spyRaw.size();
60  decodeInfo();
61 }
62 
63 //=============================================================================
64 //
65 //=============================================================================
67  m_spyEvt.reserve( m_spySize);
68  m_spyChannel.reserve(m_spySize);
69  m_spyEvt.clear();
70  m_spyChannel.clear();
71  for (int index = 0 ; index < m_spySize ; ++index){
72  m_spyEvt.push_back(((m_spyRaw[index]>>0xF)&0xFF));
73  m_spyChannel.push_back(m_spyRaw[index]&0xF);
74  }
75 }
76 
77 //=============================================================================
std::vector< int > m_spyEvt
Definition: Run.h:77
void setSpy(std::vector< short >)
Definition: Run.cpp:57
virtual ~Run()
Destructor.
Definition: Run.cpp:52
def run(processus, element, nevt)
Definition: shell.py:237
ClassImp(Run) Run
Definition: Run.cpp:14
ClassDef(Run, 1) protected unsigned long m_date
Definition: Run.h:68
list index
Definition: images.py:1021
std::vector< int > m_spyChannel
Definition: Run.h:78
int m_spySize
Definition: Run.h:76
void decodeInfo()
Definition: Run.cpp:66
std::vector< short > m_spyRaw
Definition: Run.h:75
Run()
Standard constructor.
Definition: Run.h:17