StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StjFourVecPrint.cxx
1 // $Id: StjFourVecPrint.cxx,v 1.1 2008/11/27 07:29:52 tai Exp $
2 // Copyright (C) 2008 Tai Sakuma <sakuma@bnl.gov>
3 #include "StjFourVecPrint.h"
4 
5 #include <iostream>
6 #include <iomanip>
7 
8 ClassImp(StjFourVecPrint)
9 
10 using namespace std;
11 
12 void StjFourVecPrint::operator()(const StjFourVecList &fourList)
13 {
14  for(StjFourVecList::const_iterator it = fourList.begin(); it != fourList.end(); ++it) {
15  print(*it);
16  }
17 }
18 
19 void StjFourVecPrint::print(const StjFourVec& four)
20 {
21  cout
22  << setw(7) << four.runNumber << ", "
23  << setw(7) << four.eventId << ", "
24  << setw(4) << four.fourvecId << ", "
25  << setw(1) << four.type << ", "
26  << setw(1) << four.detectorId << ", "
27  << setw(4) << four.trackId << ", "
28  << setw(4) << four.towerId << ", "
29  << setw(4) << four.mcparticleId << ", "
30  << setw(10) << four.pt << ", "
31  << setw(10) << four.eta << ", "
32  << setw(10) << four.phi << ", "
33  << setw(14) << four.m << ", "
34  << setw(10) << four.vertexZ
35  << endl;
36 
37 }