StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StjTowerEnergyPrint.cxx
1 // $Id: StjTowerEnergyPrint.cxx,v 1.1 2008/11/27 07:35:32 tai Exp $
2 // Copyright (C) 2008 Tai Sakuma <sakuma@bnl.gov>
3 #include "StjTowerEnergyPrint.h"
4 
5 #include <iostream>
6 #include <iomanip>
7 
8 ClassImp(StjTowerEnergyPrint)
9 
10 using namespace std;
11 
12 void StjTowerEnergyPrint::operator()(const StjTowerEnergyList &energyList)
13 {
14  for(StjTowerEnergyList::const_iterator it = energyList.begin(); it != energyList.end(); ++it) {
15  print(*it);
16  }
17 }
18 
19 void StjTowerEnergyPrint::print(const StjTowerEnergy& energyDeposit)
20 {
21  cout
22  << setw(7) << energyDeposit.runNumber << ", "
23  << setw(7) << energyDeposit.eventId << ", "
24  << setw(4) << energyDeposit.detectorId << ", "
25  << setw(4) << energyDeposit.towerId << ", "
26  << setw(7) << energyDeposit.towerR << ", "
27  << setw(7) << energyDeposit.towerEta << ", "
28  << setw(7) << energyDeposit.towerPhi << ", "
29  << setw(7) << energyDeposit.vertexX << ", "
30  << setw(7) << energyDeposit.vertexY << ", "
31  << setw(7) << energyDeposit.vertexZ << ", "
32  << setw(10) << energyDeposit.energy << ", "
33  << setw(7) << energyDeposit.adc << ", "
34  << setw(7) << energyDeposit.pedestal << ", "
35  << setw(7) << energyDeposit.rms << ", "
36  << setw(3) << energyDeposit.status
37  << endl;
38 
39 }