void Grid::Print() { // Method to print the grid in the console std::cout << std::endl; // 1st row std::cout << GetNO().GetNO() << " " << GetNO().GetN() << " " << GetNO().GetNE() << " " << GetN().GetNO() << " " << GetN().GetN() << " " << GetN().GetNE() << " " << GetNE().GetNO() << " " << GetNE().GetN() << " " << GetNE().GetNE() << std::endl; // 2nd row std::cout << GetNO().GetO() << " " << GetNO().GetC() << " " << GetNO().GetE() << " " << GetN().GetO() << " " << GetN().GetC() << " " << GetN().GetE() << " " << GetNE().GetO() << " " << GetNE().GetC() << " " << GetNE().GetE() << std::endl; // 3rd row std::cout << GetNO().GetSO() << " " << GetNO().GetS() << " " << GetNO().GetSE() << " " << GetN().GetSO() << " " << GetN().GetS() << " " << GetN().GetSE() << " " << GetNE().GetSO() << " " << GetNE().GetS() << " " << GetNE().GetSE() << std::endl; // 4th row std::cout << GetO().GetNO() << " " << GetO().GetN() << " " << GetO().GetNE() << " " << GetC().GetNO() << " " << GetC().GetN() << " " << GetC().GetNE() << " " << GetE().GetNO() << " " << GetE().GetN() << " " << GetE().GetNE() << std::endl; // 5th row std::cout << GetO().GetO() << " " << GetO().GetC() << " " << GetO().GetE() << " " << GetC().GetO() << " " << GetC().GetC() << " " << GetC().GetE() << " " << GetE().GetO() << " " << GetE().GetC() << " " << GetE().GetE() << std::endl; // 6th row std::cout << GetO().GetSO() << " " << GetO().GetS() << " " << GetO().GetSE() << " " << GetC().GetSO() << " " << GetC().GetS() << " " << GetC().GetSE() << " " << GetE().GetSO() << " " << GetE().GetS() << " " << GetE().GetSE() << std::endl; // 7th row std::cout << GetSO().GetNO() << " " << GetSO().GetN() << " " << GetSO().GetNE() << " " << GetS().GetNO() << " " << GetS().GetN() << " " << GetS().GetNE() << " " << GetSE().GetNO() << " " << GetSE().GetN() << " " << GetSE().GetNE() << std::endl; // 8th row std::cout << GetSO().GetO() << " " << GetSO().GetC() << " " << GetSO().GetE() << " " << GetS().GetO() << " " << GetS().GetC() << " " << GetS().GetE() << " " << GetSE().GetO() << " " << GetSE().GetC() << " " << GetSE().GetE() << std::endl; // 9th row std::cout << GetSO().GetSO() << " " << GetSO().GetS() << " " << GetSO().GetSE() << " " << GetS().GetSO() << " " << GetS().GetS() << " " << GetS().GetSE() << " " << GetSE().GetSO() << " " << GetSE().GetS() << " " << GetSE().GetSE() << std::endl; std::cout << std::endl; }
bool Grid::isConsistent() { bool result = true; if(Col1().isConsistent()){result=false;} if(Col2().isConsistent()){result=false;} if(Col3().isConsistent()){result=false;} if(Col4().isConsistent()){result=false;} if(Col5().isConsistent()){result=false;} if(Col6().isConsistent()){result=false;} if(Col7().isConsistent()){result=false;} if(Col8().isConsistent()){result=false;} if(Col9().isConsistent()){result=false;} if(Row1().isConsistent()){result=false;} if(Row2().isConsistent()){result=false;} if(Row3().isConsistent()){result=false;} if(Row4().isConsistent()){result=false;} if(Row5().isConsistent()){result=false;} if(Row6().isConsistent()){result=false;} if(Row7().isConsistent()){result=false;} if(Row8().isConsistent()){result=false;} if(Row9().isConsistent()){result=false;} if(GetNO().isConsistent()){result=false;} if(GetN().isConsistent()){result=false;} if(GetNE().isConsistent()){result=false;} if(GetO().isConsistent()){result=false;} if(GetC().isConsistent()){result=false;} if(GetE().isConsistent()){result=false;} if(GetSO().isConsistent()){result=false;} if(GetS().isConsistent()){result=false;} if(GetSE().isConsistent()){result=false;} return result; }
/** * Get a histogram from a directory/collection * * @param dir Directory/collection * @param name Name of object * * @return Pointer to read object or null */ TH1* GetH1(TDirectory* dir, const char* name) { return static_cast<TH1*>(GetO(dir,name,TH1::Class())); }
/** * Get a directory from a directory/collection * * @param dir Directory/collection * @param name Name of object * * @return Pointer to read object or null */ TDirectory* GetD(TDirectory* dir, const char* name) { return static_cast<TDirectory*>(GetO(dir,name,TDirectory::Class())); }
Row Grid::Row6() { RowHolder rH = GetO().BottomRow(), rC = GetC().BottomRow(), rB = GetE().BottomRow(); return Row(rH, rC, rB); }
Row Grid::Row5() { RowHolder rH = GetO().MiddleRow(), rC = GetC().MiddleRow(), rB = GetE().MiddleRow(); return Row(rH, rC, rB); }
Row Grid::Row4() { RowHolder rH = GetO().TopRow(), rC = GetC().TopRow(), rB = GetE().TopRow(); return Row(rH, rC, rB); }
Column Grid::Col3() { ColumnHolder sH = GetNO().RightColumn(), sC = GetO().RightColumn(), sB = GetSO().RightColumn(); return Column(sH, sC, sB); }
Column Grid::Col2() { ColumnHolder sH = GetNO().MiddleColumn(), sC = GetO().MiddleColumn(), sB = GetSO().MiddleColumn(); return Column(sH, sC, sB); }
Column Grid::Col1() { ColumnHolder sH = GetNO().LeftColumn(), sC = GetO().LeftColumn(), sB = GetSO().LeftColumn(); return Column(sH, sC, sB); }