WriteGains Method

#include <iostream.h>
#include "WriteGains.h"
#include "StTpcDbUtil/StTpcDbUtil.h"
#include "StTpcDbUtil/StTpcGains.h"


// DB utility object
StTpcDbUtil tpcDb; 

// init with Timestamp. 
// can also tpcDb.setVersionName(char*);
tpcDb.setRequestTime("1999-10-10 00:00:01");

// can also getGains(char* version)
StTpcGains* mgains = tpcDb.getGains();

// now use data via methods
int sectors = mgains->numSectors();

// --> sector loop
 for(int isec=1;isec<=mgains->numSectors();isec++){
   // --> padrow loop 
   for(int irow=1;irow<=mgains->numPadRows(isec);irow++){
     // --> pad loop
     for(int ipad=1;ipad<=mgains->numPadsPerRow(isec,irow);ipad++){
       cout<<isec<<", "<<irow<<", "<<ipad<<", ";
       cout<<mgains->gain(isec,irow,ipad) << endl;


ROOT page - Class index - Top of the page

This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.